OSDN Git Service

option update: use non-strict comparison
authorscribu <mail@scribu.net>
Tue, 6 Aug 2013 23:26:41 +0000 (02:26 +0300)
committerscribu <mail@scribu.net>
Tue, 6 Aug 2013 23:36:00 +0000 (02:36 +0300)
php/commands/option.php

index ccefe5b..a825342 100644 (file)
@@ -67,7 +67,7 @@ class Option_Command extends WP_CLI_Command {
                $result = update_option( $key, $value );
 
                // update_option() returns false if the value is the same
-               if ( !$result && $value !== get_option( $key ) ) {
+               if ( !$result && $value != get_option( $key ) ) {
                        WP_CLI::error( "Could not update option '$key'." );
                } else {
                        WP_CLI::success( "Updated '$key' option." );