maybe_serialize( ) – a question about the code
-
Inside functions.php :
function maybe_serialize( $data ) { if ( is_array( $data ) || is_object( $data ) ) return serialize( $data ); if ( is_serialized( $data ) ) return serialize( $data ); return $data; }
From the description:
Serialize data, if needed
So why these lines:
if ( is_serialized( $data ) ) return serialize( $data );
Is it a double serialization, isn’t it? Or am I missing anything?
Found this in MU 2.9.2 but WP 3.0.1 has also.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘maybe_serialize( ) – a question about the code’ is closed to new replies.