I am using a great WordPress to store files on Amazon S3 called “Amazon S3 for WordPress” it seems to have a bug with version 3.0+ of WordPress.
The error I am getting is:
Warning: strpos() expects parameter 1
to be string, array given in
/home/dir/public_html/www.site.com/wp-admin/includes/media.php
on line 310
Here is the code in media.php around line 310:
wp_enqueue_style( 'global' );
wp_enqueue_style( 'wp-admin' );
wp_enqueue_style( 'colors' );
// Check callback name for 'media'
if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) ) || 0 === strpos( $content_func, 'media' ) )
wp_enqueue_style( 'media' );
wp_enqueue_style( 'ie' );
I would love some clue as to what is going on.
Thanks
Actually, I think you’ve found a bug in WordPress. The line of code that’s throwing the error is this:
If you look at that, the second scenario assumes
$content_funcis a string and passes it throughstrposMaybe something like
Would work better.