[wp-trac] [WordPress Trac] #17824: Warning In the Media Library

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 17 12:26:50 UTC 2011


#17824: Warning In the Media Library
----------------------------+-----------------------------------
 Reporter:  sunsuron        |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.1.3
 Severity:  normal          |   Keywords:  needs-patch has-patch
----------------------------+-----------------------------------
 New WP 3.1.3 installation. Enable Error and go to ''Media Library''

 {{{
 Warning: explode() expects parameter 2 to be string, array given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2390

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399

 Warning: in_array() expects parameter 2 to be array, null given in
 D:\devel\htdocs\jrvacation.com.my\upload\wordpress\wp-includes\query.php
 on line 2399
 }}}

 Possible fix:

 {{{
 // line 2390
 $q_status = (!is_array($q['post_status'])) ? explode(',',
 $q['post_status']) : $q['post_status'];
 }}}

 or

 {{{
 // comment line 2390
 // edit line 2399
 if ( in_array( $status, $q['post_status'] ) ) {
 }}}

 etc

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17824>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list