Ariadne CMS (1)
PHP (1)

How do I get rid of all those ereg* and reference passing deprecated errors in Ariadne?

When I run Ariadne 2.7.x on PHP 5.3.x I get a lot of ereg... function deprecated errors. I also get deprecated errors about call-time pass-by-reference among others.

You can't just get rid of the with the error_reporting and display_errors directives in php.ini.

Ariadne tinkers with error reporting in its code in a number of places. I've been able to get rid of these until the Ariadne code base is updated by editing the file:

lib/objects/ariadne_object.php

and putting this at the top:

error_reporting(0);

Ariadne registers its own error handling function with PHP and one of the first things that function does is check to see what the current value of the error_reporting directive is. If 0, it immediately returns. So, by forcing it to 0 here, you ensure it will always return 0 in the error handler. Note that you may not get to see others that you do want to know about, especially in development, so just be aware.

Comments

Add a Comment



NOTE: Comments are moderated and will not show until approved.