Ticket #17375: 17375.5.patch
File 17375.5.patch, 1.6 KB (added by , 10 years ago) |
---|
-
src/wp-includes/functions.php
327 327 } 328 328 // or else fall through 329 329 case 'a' : 330 case 'C' : 330 331 case 'O' : 331 return (bool) preg_match( "/^{$token}:[ 0-9]+:/s", $data );332 return (bool) preg_match( "/^{$token}:[+]?[0-9]+:/s", $data ); 332 333 case 'b' : 333 334 case 'i' : 334 335 case 'd' : -
tests/phpunit/includes/functions.php
102 102 echo "\t $k : $v\n"; 103 103 } 104 104 } 105 } 106 107 class Serialized_Class implements Serializable { 108 109 public $data = array( 110 'one', 111 'two', 112 'three', 113 ); 114 115 public function serialize() { 116 return serialize($this->data); 117 } 118 119 public function unserialize( $serialized ) {} 120 105 121 } 122 No newline at end of file -
tests/phpunit/tests/functions.php
158 158 serialize("a\nb"), 159 159 serialize(array()), 160 160 serialize(array(1,1,2,3,5,8,13)), 161 serialize( (object)array('test' => true, '3', 4) ) 161 serialize( (object)array('test' => true, '3', 4) ), 162 serialize( new Serialized_Class() ) 162 163 ); 163 164 foreach ( $cases as $case ) 164 165 $this->assertTrue( is_serialized($case), "Serialized data: $case" );