#3642 closed defect (bug) (fixed)
"Fatal error: [] operator not supported for strings in wp-includes/classes.php on line 402" after upgrade to 2.1
| Reported by: | gregh | Owned by: | ryan |
|---|---|---|---|
| Priority: | low | Milestone: | 2.1.1 |
| Component: | Administration | Version: | 2.1 |
| Severity: | normal | Keywords: | has-patch needs-testing 2nd-opinion dev-feedback |
| Cc: | Focuses: |
Description
I just performed an upgrade to 2.1 and when I try to go to "Admin -> Manage -> Posts" I get the following error:
"Fatal error: [] operator not supported for strings in /path_to_wp/wp-includes/classes.php on line 402"
The last thing printed to the browser prior to the error was "Browse category:", the rest of the page is blank. This makes managing posts impossible, so it is a pretty big deal.
So it seems that the minimum PHP version requirement was bumped in this release but the release notes don't mention this at all. So this either WordPress itself or the release notes need to be fixed.
For reference, I am running Red Hat Enterprise Linux (ES3), and the latest version of PHP supplied by Red Hat (with backported security patches) is PHP 4.3.2. The only active plugin is Akismet.
Attachments (1)
Change History (10)
#3
@
20 years ago
- Owner changed from to
Tracing this backwards, I've gotten this far:
category-template.php:182 must be returning non-array
$categories = get_categories($r);
So the bug is probably there. get_categories should probably return blank array() if it has no results.
#5
@
20 years ago
- Keywords has-patch needs-testing 2nd-opinion dev-feedback added
I can't reproduce this but I decided to poke around and take a look anyways. get_categories() actually DOES return a blank array if it doesn't have any resultsp
if ( empty($categories) )
return array();
I can't really figure out how or why Walker:walk() is being passed a string instead of an array, but if we can get rid of that ugly fatal error then we can at least get our users able to manage their posts.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The required PHP ersion vhas not been bumped. For some reason, Walker::walk() is being passed a string instead of an array.