Jump to content

Error log query


Recommended Posts

I think this is what is happening.

PHP will first perform a process against a script when it is first called known as "compile time". Then, the logic is figured out, a few other things happen, and we then have "run time".

At "compile time", PHP will notice that the __autoload() functionality is not used anymore and issue a notice. It does not matter if the code is never executed at "run time".

There are a few places where we need to tell CubeCart to not give us any notice of these deprecation errors.

In the file ini.inc.php, near line 19:


error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);



In the file /controllers/controller.index.inc.php, near line 37:

$GLOBALS['smarty']->error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING;

This a setting specific to Smarty, the template rendering engine. We can change this, but it is not really necessary - yet.

In the file /classes/debug.class.php, near line 102, find:


This command is executed if debugging is disabled. However, if debugging is enabled, then everything gets logged (line 85).


Link to comment
Share on other sites

An annoyance, actually.

In PHP 8, __autoload() will be removed, and then it becomes something to fix -- which PHPMailer will have this fixed on their next version.

However, it would be worthwhile to suggest the code change to ini.inc.php in an issue in the Github.

Link to comment
Share on other sites

No, sorry.

The fact is, PHPMailer is the master controller for all email functionality. CubeCart will tell PHPMailer to use PHP's mail() function if that is what is selected in admin. I would think the reason is so that PHPMailer can execute a controlled attempt to send an email, and if a failure happens, like if there is no server-installed mail agent or the PHP.INI file isn't actually configured to use it, there would be a catchable resolution and graceful response -- as opposed to something much more WTF-like.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...