OSDN Git Service

define COOKIEHASH to get rid of DB warning
authorscribu <mail@scribu.net>
Wed, 17 Jul 2013 01:08:06 +0000 (04:08 +0300)
committerscribu <mail@scribu.net>
Wed, 17 Jul 2013 01:08:10 +0000 (04:08 +0300)
That's because wp_cookie_constants() goes looking for siteurl in the
not-yet-existing wp_sitemeta table.

php/WP_CLI/Runner.php

index dc18ebf..47832b5 100644 (file)
@@ -404,6 +404,10 @@ class Runner {
                        if ( 'multisite-install' == $this->arguments[1] ) {
                                // need to fake some globals to skip the checks in wp-inclues/ms-settings.php
                                self::fake_current_site_blog( $url_parts );
+
+                               if ( !defined( 'COOKIEHASH' ) ) {
+                                       define( 'COOKIEHASH', md5( $url_parts['host'] ) );
+                               }
                        }
                }