Serialize fix
This commit is contained in:
		
							parent
							
								
									33ed96eba0
								
							
						
					
					
						commit
						c58814ab64
					
				| @ -12,6 +12,7 @@ class PhpHandler implements HandlerInterface { | |||||||
|     /** |     /** | ||||||
|      * {@inheritdoc} |      * {@inheritdoc} | ||||||
|      * @link http://ca2.php.net/manual/en/function.session-decode.php#108037 Code from this comment on php.net
 |      * @link http://ca2.php.net/manual/en/function.session-decode.php#108037 Code from this comment on php.net
 | ||||||
|  |      * @throws UnexpectedValueException If there is a problem parsing the data | ||||||
|      */ |      */ | ||||||
|     public function unserialize($raw) { |     public function unserialize($raw) { | ||||||
|         $returnData = array(); |         $returnData = array(); | ||||||
| @ -19,7 +20,7 @@ class PhpHandler implements HandlerInterface { | |||||||
| 
 | 
 | ||||||
|         while ($offset < strlen($raw)) { |         while ($offset < strlen($raw)) { | ||||||
|             if (!strstr(substr($raw, $offset), "|")) { |             if (!strstr(substr($raw, $offset), "|")) { | ||||||
|                 throw new Exception("invalid data, remaining: " . substr($raw, $offset)); |                 throw new \UnexpectedValueException("invalid data, remaining: " . substr($raw, $offset)); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             $pos     = strpos($raw, "|", $offset); |             $pos     = strpos($raw, "|", $offset); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Chris Boden
						Chris Boden