Use array_filter() to remove empty values from an array, not jankiness.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c94b474b17
commit
277a8131d2
|
@ -1453,7 +1453,7 @@ function dbDelta( $queries = '', $execute = true ) {
|
|||
// Separate individual queries into an array
|
||||
if ( !is_array($queries) ) {
|
||||
$queries = explode( ';', $queries );
|
||||
if ('' == $queries[count($queries) - 1]) array_pop($queries);
|
||||
$queries = array_filter( $queries );
|
||||
}
|
||||
$queries = apply_filters( 'dbdelta_queries', $queries );
|
||||
|
||||
|
|
Loading…
Reference in New Issue