OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b6efb9
)
handle wpdb error ourselves, instead of waiting for dead_db()
author
scribu
<mail@scribu.net>
Mon, 11 Mar 2013 16:32:38 +0000
(18:32 +0200)
committer
scribu
<mail@scribu.net>
Mon, 11 Mar 2013 16:33:42 +0000
(18:33 +0200)
php/wp-settings-cli.php
patch
|
blob
|
history
diff --git
a/php/wp-settings-cli.php
b/php/wp-settings-cli.php
index
dd64be7
..
12321c1
100644
(file)
--- a/
php/wp-settings-cli.php
+++ b/
php/wp-settings-cli.php
@@
-61,6
+61,10
@@
Utils\replace_wp_die_handler();
// Include the wpdb class and, if present, a db.php database drop-in.
require_wp_db();
+// WP-CLI: Handle db error ourselves, instead of waiting for dead_db()
+if ( !empty( $wpdb->error ) )
+ wp_die( $wpdb->error );
+
// Set the database table prefix and the format specifiers for database table columns.
$GLOBALS['table_prefix'] = $table_prefix;
wp_set_wpdb_vars();