Jump to content

Syntax Error in classes/cubecart.class.php ??


Claudia

Recommended Posts

classes/cubecart.class.php  My line: 2196

 

I noticed this while comparing files.  Don't know if it's important but thought I'd let you know.

 

Syntax error, unexpected '='

 

if(($download['file_info']['stream'] ??= 0)==1) { // Make un-streamable if FileManager does not otherwise indicate - for template
Link to comment
Share on other sites

The sequence ??= is called a "Null Coalescing Assignment" operator, and was adopted into PHP 7.4.

Please know that PHP can be run in either of two ways: as an 'application' (for lack of a better word) spun up by a web browser server, and as a 'command-line script' (in a text-based console window).

Each of these two ways can specify which specific version of PHP will be used to run the PHP code files.

Receiving that error would suggest that the version of PHP running CubeCart's code files, in whatever particular environment you are seeing this, is prior to PHP 7.4.

 

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...