Make WordPress Core

Changeset 53886

Timestamp:
08/12/2022 09:24:23 AM (2 years ago)
Author:
audrasjb
Message:

Formatting: Add support for Enums in is_serialized().

This changeset adds support for Enums in is_serialized(). It also adds new unit tests for this function.

Props ayeshrajans, konradyoast, peterwilsoncc, costdev, dennisatyoast, mukesh27.
Fixes #53299.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r53878 r53886  
    658658 * Check value to find if it was serialized.
    659659 *
    660  * If $data is not an string, then returned value will always be false.
     660 * If $data is not a string, then returned value will always be false.
    661661 * Serialized data is always a string.
    662662 *
    663663 * @since 2.0.5
     664
    664665 *
    665666 * @param string $data   Value to check to see if was serialized.
     
    715716        case 'a':
    716717        case 'O':
     718
    717719            return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data );
    718720        case 'b':
Note: See TracChangeset for help on using the changeset viewer.