PHP Classes

Syntax Error

Recommend this page to a friend!

      JData  >  All threads  >  Syntax Error  >  (Un) Subscribe thread alerts  
Subject:Syntax Error
Summary:Using isset for constant instead of defined
Messages:2
Author:Gary Smith
Date:2016-07-16 20:52:40
 

  1. Syntax Error   Reply   Report abuse  
Picture of Gary Smith Gary Smith - 2016-07-16 20:52:40
A syntax error is generated on line 57 due to the class using 'isset' instead of 'defined' to test if a constant exists. It would be nice to see an extra set of parenthesis around the second part:
if (defined('ENVIRONMENT') && (ENVIRONMENT == "development"))

Also, it would be nice to see an example file and a file to test all of the functions.

  2. Re: Syntax Error   Reply   Report abuse  
Picture of Pau Rodriguez Pau Rodriguez - 2016-07-29 13:18:43 - In reply to message 1 from Gary Smith
Same here, what about this error?
Than you!