[wp-trac] [WordPress Trac] #4391: WP displaying Array all over the
place
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 1 19:52:07 GMT 2007
#4391: WP displaying Array all over the place
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version: 2.2
Severity: major | Keywords:
-------------------------------+--------------------------------------------
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.
--
Ticket URL: <http://trac.wordpress.org/ticket/4391>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list