Transferred from: http://www.thinkphp.cn/topic/26815.html
Solve the occasional Class ' think\log ' not Found's wonderful problem (not every time must be, occasionally delete the cache can be resolved, occasionally delete the cache page does not), php5.3 version of the bug (PHP 5.4.21 has fixed this bug), Set_error_ Handler handler function cannot invoke Spl_autoload_register to load the log class from the problem
Workaround:
Files: thinkphp/library/think/think.class.php
Location: Storage::connect (Storage_type); Add the following line of code Version_compare (php_version, ' 5.4.21 ', ' < ') && Log::info; pre-loading the Log class before Error_Handler
Reason reference:
Http://stackoverflow.com/questions/1942507/set-error-handler-function-not-calling-autoload]
https://bugs.php.net/bug.php?id=47987
https://bugs.php.net/bug.php?id=65322
Go Class ' Think\log ' not found