Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #60355, comment 1


Ignore:
Timestamp:
01/26/2024 08:50:27 PM (12 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60355, comment 1

    initial v1  
    11This sounds like PHP limitation, maybe check https://www.php.net/manual/en/language.oop5.serialization.php.
    22
    3 Think this is a documentation problem in WP. Imho the docblocks for adding options and meta should state clearly that saving instances of PHP objects to the DB is not recommended and that only simple objects are supported (like plain name->value pairs?). Also that the preferable format to save to the DB are strings or associative arrays, not objects.
     3Think this is a documentation problem in WP. Imho the docblocks for adding options and meta should state clearly that saving class instances or PHP objects to the DB is not recommended and that only simple objects are supported (like plain name->value pairs?). Also that the preferable format to save to the DB are strings or associative arrays, not objects.
    44
    55Setting this as a "documentation enhancement" for 6.5.