Null Cooalescing Operator, Syntax Error

New Here ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

My server is running PHP 7.2.26. I'm coding in Dreamweaver CC (Ver 19.2.1). I'm using null-coalescing operator on a page, but Dreamweaver is giving me "Syntax Error, Unexpected '?'" as a line error.

My code:

($_SESSION['form_data']['smtpEmailAddress'] ?? "")

It works fine when viewing in a browser. I only get the error in Dreamweaver. Is there a way to get Dreamweaver to accept Null-coalescing Operator? Dreamweaver is currently set to use PHP 7.1. 7.2 is not an option within preferences.

I know I could just ignore the Dreamweaver error, but I do scan my code for errors using the Dreamweaver error indicators. I'd rather fix Dreamweaver than just ignore the error.

TOPICS
Code , Error

Views

299

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

LATEST

I do not know of any way to upgrade code hinting and error reporting to PHP 7.2.  I think you'll need to ignore it and wait for a DW update.   See the 2020 Roadmap below.

https://community.adobe.com/t5/dreamweaver/dreamweaver-2020-roadmap/td-p/10885179?page=1

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines