Skip to content
Permalink
Browse files

improves fix by not serializing SplFixedArray objects

  • Loading branch information...
thinkingmedia
thinkingmedia committed Jan 30, 2017
1 parent 21ef74e commit a728cb2ab63a2912fad93f0a175f84fa728c8fc7
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/ORM/ResultSet.php
@@ -317,6 +317,10 @@ public function serialize()
$this->next();
}
if($this->_results instanceof SplFixedArray) {
return serialize($this->_results->toArray());
}
return serialize($this->_results);
}
@@ -330,8 +334,7 @@ public function serialize()
*/
public function unserialize($serialized)
{
// closes #10111 prevent SqlFixedArray instances
$this->_results = (array)unserialize($serialized);
$this->_results = (array)(unserialize($serialized) ?: []);
$this->_useBuffering = true;
$this->_count = count($this->_results);
}

0 comments on commit a728cb2

Please sign in to comment.
You can’t perform that action at this time.