简体   繁体   中英

Non-deterministic object reference bug in PHP 5.3.X

As of yesterday (perhaps after a recent PHP update?), I'm getting some very strange non-deterministic bugs in php 5.3.3. These appear in our production server in PHP 5.3.2 as well.

The errors essentially amount to Fatal error: Uncaught exception 'ErrorException' with message 'Attempt to assign property of non-object' in various parts of the code base. Generally, the error line is something like: $this->foo = $bar in a __construct() call.

$this is not found in the constructor?!

I have no idea what is going on. Any ideas? Is this possibly a regression of this bug?: http://bugs.php.net/31525

Edit : I should mention, refreshing the script after a little while, with absolutely no changes to the code, makes it work again. Hence non-deterministic.

Edit 2 : Furthermore, while PHP is set to log even the tiniest of errors, and is logging other errors as they occur, this error is not logged in the log file. This brings me to think we are looking at a PHP engine dependency error.

Well, it looks to be a bug...

Here's some relevant bug reports:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM