File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -434,8 +434,12 @@ public static function getValue( string $name ): string {
434434 $ opt_spec = self ::optionSpecs ()[ $ name ];
435435
436436 if ( ! $ opt_spec ) {
437- WsLog::w ( 'Attempt to getValue of unknown option $name ' );
438- return '' ;
437+ WsLog::l (
438+ "Unknown option: $ name " ,
439+ $ level = 'error ' ,
440+ $ option_lookups = $ option_lookups ,
441+ );
442+ throw new WP2StaticException ( "Unknown option: $ name " );
439443 }
440444
441445 $ table_name = self ::getTableName ();
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ public static function l(
7777 self ::$ debug_logging = CoreOptions::getValue ( 'debugLogging ' );
7878 }
7979
80- if ( ! isset ( self ::$ debug_logging )
81- || ( ! self ::$ debug_logging && defined ( 'WP_CLI ' ) ) ) {
80+ if ( ( ! isset ( self ::$ debug_logging )
81+ || ! self ::$ debug_logging ) && defined ( 'WP_CLI ' ) ) {
8282 $ date = current_time ( 'c ' );
8383 $ colorized = \WP_CLI ::colorize ( "%W[ $ date] %n $ text " );
8484 // --debug will show debug messages even if
You can’t perform that action at this time.
0 commit comments