PHP7: Fix Zend autoload issues

refs #10251
This commit is contained in:
Eric Lippmann 2016-01-27 16:52:32 +01:00
parent 41c05c3451
commit c1f7b2ed2d
1 changed files with 7 additions and 2 deletions

View File

@ -291,7 +291,12 @@ class ClassLoader
// Return as fast as possible if we already did so.
if (substr($class, 0, 5) === 'Zend_') {
if (! $this->gotZend) {
$this->requireZendAutoloader();
$zendLoader = $this->requireZendAutoloader();
if (version_compare(PHP_VERSION, '7.0.0') >= 0) {
// PHP7 seems to remember the autoload function stack before auto-loading. Thus
// autoload functions registered during autoload never get called
return $zendLoader::autoload($class);
}
}
return false;
}