• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

381

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
Community Expert ,
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— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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