audwan
Forum Replies Created
-
Forum: Plugins
In reply to: [Link Library] Category Display In Library Selected by UserI have exactly the same issue. Seems like the category filter doesn’t work at all. I also tried to override by including/excluding categories directly in the shortcode, but that didn’t work neighter.
Forum: Fixing WordPress
In reply to: Cannot use a scalar value as an array error in post.phpThe errors suddenly disappeared when I upgraded to WordPress 2.9.
Forum: Fixing WordPress
In reply to: Cannot use a scalar value as an array error in post.phpI’ve been doing some n00b-debugging, just to try getting to the bottom of this problem.
I replaced the else-line from the first post with:
} else if ( !is_null($post) ) {
and still get errors. That should suggest that $post being NULL is not the issue, right?Then I tried:
} else if ( is_scalar($post['ID']) ) {
and the errors disappeard.So $post[‘ID’] is not a scalar value when the error occurs, which means it is either array, object or resource (or perhaps not present)? (ref: PHP:is_scalar)
As a last resort I tried:
} else if ( !is_array($post['ID']) ) {
} else if ( !is_object($post['ID']) ) {
} else if ( !is_resource($post['ID']) ) {
but I get errors on all of them, which is where my logic breaks.Am I missing something here?
Forum: Fixing WordPress
In reply to: Cannot use a scalar value as an array error in post.phpThanks for the answer, bishopj. I appreciate any help, or just a small push in the right direction.
The comments do indeed appear on the site, and the errors occur only on the comments from users that are logged in. I tried to add a new user (subscriber), and added a comment with that user, and it produced the same error in the Dashboard. That should narrow it down a bit, but I still got no clue how to fix it.
The blog runs on PHP 5.2.8 with MySQL 5.1.30. Other blogs running on the exact same platform don’t have the same issue, and some do.
I tried reinstalling all WordPress files and disabled all my plug-ins, but the problem still persists. I even checked the database to see if there was any issues with those specific comments, but didn’t find anything suspicious.
Is there any way I can output the value or type of $post? That would probably help.
Forum: Fixing WordPress
In reply to: Cannot use a scalar value as an array error in post.phpSorry, I still have no fix other than the one in the first post.
Updated to 2.8.3, and the error is still there.
Forum: Fixing WordPress
In reply to: Cannot use a scalar value as an array error in post.phpSame error appear in 2.8.2. Just in the Dashboard, and just on my own comments.