|
@@ -728,8 +728,11 @@ class ClassMetadataInfo implements ClassMetadata
|
|
|
*/
|
|
|
public function newInstance()
|
|
|
{
|
|
|
- if ($this->_prototype === null) {
|
|
|
- $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
|
|
|
+ if ($this->_prototype === null) {
|
|
|
+ $this->_prototype = @unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
|
|
|
+ if ($this->_prototype === false) {
|
|
|
+ $this->_prototype = @unserialize(sprintf('C:%d:"%s":0:{}', strlen($this->name), $this->name));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return clone $this->_prototype;
|