Skip to content

Instantly share code, notes, and snippets.

@habibun
Created March 12, 2015 04:48
Show Gist options
  • Save habibun/b5c1002ecbd67a5e4326 to your computer and use it in GitHub Desktop.
Save habibun/b5c1002ecbd67a5e4326 to your computer and use it in GitHub Desktop.
PHP 5.6.3 Doctrine Bug ->location:vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
public function newInstance()
{
if ($this->_prototype === null) {
if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513 || PHP_VERSION_ID >= 50600) {
$this->_prototype = $this->reflClass->newInstanceWithoutConstructor();
} else {
$this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
}
}
return clone $this->_prototype;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment