Ticket #14429: 14429-strpbrk.2.patch
| File 14429-strpbrk.2.patch, 907 bytes (added by , 15 years ago) |
|---|
-
wp-includes/functions.php
228 228 * @return bool False if not serialized and true if it was. 229 229 */ 230 230 function is_serialized( $data ) { 231 static $strpbrk_exists; 231 232 // if it isn't a string, it isn't serialized 232 233 if ( !is_string( $data ) ) 233 234 return false; 234 235 $data = trim( $data ); 235 236 if ( 'N;' == $data ) 236 237 return true; 237 i f ( function_exists('strpbrk') ) {238 if ( strlen($data) > 1 && strpbrk($data,'adObis') == $data && $data[1] == ':') {239 $badions = array();238 isset( $strpbrk_exists ) || $strpbrk_exists = function_exists( 'strpbrk' ); 239 if ( $strpbrk_exists ) { 240 if ( strlen( $data ) > 3 && strpbrk( $data, 'adObis' ) === $data && ':' === $data[1] ) { 240 241 $badions[1] = $data[0]; 241 242 } else { 242 243 return false;