Opened 3 years ago
Closed 3 years ago
#14606 closed defect (bug) (invalid)
Fatal error: Cannot use object of type stdClass as array
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0.1 |
| Severity: | blocker | Keywords: | reporter-feedback |
| Cc: |
Description
I get the PHP error:
Fatal error: Cannot use object of type stdClass as array
The most recent one was from wp-includes/post.php on line 1830 when trying to trash a comment.
I have already fixed numerous instances of this problem in the app I have installed just to get it to install. At this point, there are too many instances for me to fix them all.
I am using PHP 5.3.2
I believe it is a matter of changing (for example on line 1830 of wp-includes/post.php)"
add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']);
to
add_post_meta($post_id,'_wp_trash_meta_status', $post->post_status);
Note: See
TracTickets for help on using
tickets.
are you sure that your "output" argument is set to ARRAY_A ?