<![CDATA[ Error types and PHP < 5.3 (E_DEPRECATED and E_USER_DEPRECATED) - My Forums]]> https://forums.modx.com/thread/?thread=84905 <![CDATA[Re: Error types and PHP < 5.3 (E_DEPRECATED and E_USER_DEPRECATED)]]> https://forums.modx.com/thread/84905/error-types-and-php-5-3-e-deprecated-and-e-user-deprecated#dis-post-500970 https://github.com/modxcms/evolution smiley
]]>
mrhaw Jun 19, 2014, 11:06 PM https://forums.modx.com/thread/84905/error-types-and-php-5-3-e-deprecated-and-e-user-deprecated#dis-post-500970
<![CDATA[Error types and PHP < 5.3 (E_DEPRECATED and E_USER_DEPRECATED)]]> https://forums.modx.com/thread/84905/error-types-and-php-5-3-e-deprecated-and-e-user-deprecated#dis-post-468166
I recently upgraded from 1.0.7 to 1.0.10 and ran into a problem with the PHP error types. While using a snippet as a custom TV input a PHP Notice was thrown, along with the message "Use of undefined constant E_USER_DEPRECATED - assumed 'E_USER_DEPRECATED'".

The required PHP version for 1.0.9 and 1.0.10 silently levelled up from 4.3.3+ to 5.3.3+ and since my host (Strato.de) is using PHP 5.2.17, I'm using a PHP version in which "E_DEPRECATED" and "E_USER_DEPRECATED" don't exist.

I my situation it was enough to insert
if(!defined('E_DEPRECATED')) { define('E_DEPRECATED',''); }
if(!defined('E_USER_DEPRECATED')) { define('E_USER_DEPRECATED',''); }

above line 2874 in document.parser.class.inc.php to get rid of that message.

Should I report that behaviour as a bug or is it not a bug because I didn't fullfill the requirements?]]>
kulmjens Jun 05, 2013, 01:41 PM https://forums.modx.com/thread/84905/error-types-and-php-5-3-e-deprecated-and-e-user-deprecated#dis-post-468166