Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4392 closed defect (bug) (invalid)

WP displaying Array all over the place

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: major Version: 2.2
Component: General Keywords:
Focuses: Cc:


I'm having this weird problem on a customer server, whereby Array gets displayed all over the place. I've reuploaded and reuploaded thinking it was a mere corrupt file problem, but to no avail.

The symptom is most clear in the plugins folder, where pretty much every file in the plugins folder that are _not_ plugins gets listed, as in:

Array   Array By Array.   Activate 	

... with an activate link that points to a completely irrelevant file.

Other areas where Array shows up include the default post slugs, weird additional items to the static page list in the pages widget, and so on.

If anything, I'm guessing an error is occurring in each and every location where the empty() function is used to check if a string or an array is empty. Why not use variable === and !$variable respectively?

I'm attaching the phpinfo details, as I'm guessing it has something to do with the server configuration.

Also for reference, if I add this in the get_plugin_data() function to inspect:

var_dump($plugin_name, $plugin_name[1], trim($plugin_name[1]));

it returns stuff like:

array(2) {
  string(20) "Plugin Name: Akismet"
  string(8) " Akismet"
string(8) " Akismet"
string(7) "Akismet"

array(0) {
array(0) {
string(5) "Array"

along the same lines, if I add the following in the post editor:

var_dump($post, $post->post_name);

it returns the following when I browse to Write / Write post:

object(stdClass)(11) {
  string(5) "draft"
  string(6) "closed"
  string(4) "open"
  string(0) ""
  string(1) "1"
  string(0) ""
  string(0) ""
  string(7) "default"
array(0) {

and that last value will result in Array getting displayed as the post slug.

anyway... I'm having the customer change hosts from lack of any better options, but I figured I'd highlight this in case anyone else gets the problem.

Attachments (1)

phpinfo.htm (46.5 KB) - added by Denis-de-Bernardy 17 years ago.

Download all attachments as: .zip

Change History (5)

#1 @rob1n
17 years ago

  • Milestone set to 2.4

#2 @MichaelH
17 years ago

User reported that PHP 4.3.10 and Zend Optimizer 2.5.10 was the problem and after upgrading both PHP and Zend the problem was solved:

See this forum thread:

#3 @rob1n
17 years ago

So I suppose we can mark this as invalid and tell the user to upgrade their Zend Optimizer?

#4 @markjaquith
17 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.