#7201 closed defect (bug) (duplicate)
Dead code in maybe_serialize function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | trivial | Version: | 2.5 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Looking at the code of maybe_serialize() caused some confusion, because it doesn't appear that the code will ever execute as the first if branch will always evaluate serialized data to be true. This means that when the execution gets down to
if ( is_serialized( $data ) ) // <--- Always false return serialize( $data ); // <--- Dead Code
This probably needs to be moved up a bit to the top of the function body.
Attachments (1)
Change History (7)
#1
@
14 years ago
The test cases need to be patched in the wp-testcases folder in the Automattic WordPress Tests repository.
#2
@
14 years ago
There has been a previous discussion on the topic in #4029 and I suppose the expected result is that serialized data should be serialized again.
Note: See
TracTickets for help on using
tickets.
Test cases for maybe_serialize()