Ticket #4392 (closed defect (bug): invalid)

Opened 2 years ago

Last modified 2 years ago

WP displaying Array all over the place

Reported by: Denis-de-Bernardy Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.2
Severity: major Keywords:
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

phpinfo.htm (46.5 kB) - added by Denis-de-Bernardy on 06/01/07 19:56:13.

Change History

06/01/07 19:56:13 changed by Denis-de-Bernardy

  • attachment phpinfo.htm added.

06/01/07 20:07:14 changed by rob1n

  • milestone set to 2.4.

06/02/07 12:49:55 changed by MichaelH

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

06/02/07 18:37:10 changed by rob1n

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

06/03/07 05:04:09 changed by markjaquith

  • status changed from new to closed.
  • resolution set to invalid.
  • milestone deleted.