WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#4392 closed defect (bug) (invalid)

WP displaying Array all over the place

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

Description

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) {
  [0]=>
  string(20) "Plugin Name: Akismet"
  [1]=>
  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) {
  ["post_status"]=>
  string(5) "draft"
  ["comment_status"]=>
  string(6) "closed"
  ["ping_status"]=>
  string(4) "open"
  ["post_pingback"]=>
  string(0) ""
  ["post_category"]=>
  string(1) "1"
  ["post_content"]=>
  NULL
  ["post_title"]=>
  string(0) ""
  ["post_excerpt"]=>
  string(0) ""
  ["page_template"]=>
  string(7) "default"
  ["post_parent"]=>
  int(0)
  ["menu_order"]=>
  int(0)
}
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 12 years ago.

Download all attachments as: .zip

Change History (5)

#1 @rob1n
12 years ago

  • Milestone set to 2.4

#2 @MichaelH
12 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: http://wordpress.org/support/topic/118367

#3 @rob1n
12 years ago

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

#4 @markjaquith
12 years ago

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