-
Notifications
You must be signed in to change notification settings - Fork 65
Create an array for themes post meta #331
Copy link
Copy link
Closed
Description
When using get_post_meta with the $single parameter set to true, the returned value will be either the meta value (could be anything like a string, array or object for instance), or an empty string if the meta key is not found for the given post.
In this file (https://github.com/uncatcrea/wp-appkit/blob/master/wp-appkit/lib/themes/themes-storage.php#L92), we only check that the value is empty and assume it's already an array. This fails and triggers a Warning: Illegal string offset 'current_theme' + Cannot assign an empty string to a string offset.
We should then create the array before assigning the value.
Reactions are currently unavailable