Skip to content

Commit

Permalink
Merge pull request #330 from mainwp/mainwp-child-dev
Browse files Browse the repository at this point in the history
Mainwp child dev
  • Loading branch information
thanghv authored Aug 24, 2022
2 parents c9db510 + 819c582 commit 6469c58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion class/class-mainwp-child-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public static function real_escape_string( $value ) {
*/
public static function is_result( $result ) {
if ( self::use_mysqli() ) {
return ( $result instanceof mysqli_result );
return ( $result instanceof \mysqli_result );
} else {
return is_resource( $result );
}
Expand Down
13 changes: 12 additions & 1 deletion class/class-mainwp-security.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,18 @@ public static function remove_database_reporting_ok() {
* @return bool true|false If the PHP error reporting has been disabled, return true, if not, return false.
*/
public static function remove_php_reporting_ok() {
return ! ( ( ( 0 != ini_get( 'display_errors' ) ) && ( 'off' != ini_get( 'display_errors' ) ) ) || ( ( 0 != ini_get( 'display_startup_errors' ) ) && ( 'off' != ini_get( 'display_startup_errors' ) ) ) );
$is_ok = true;
$display_off = ini_get( 'display_errors' );
if ( ! empty( $display_off ) ) {
$display_off = strtolower( $display_off );
$is_ok = ( $is_ok || 'off' === $display_off );
}
$display_startup_off = ini_get( 'display_startup_errors' );
if ( ! empty( $display_startup_off ) ) {
$display_startup_off = strtolower( $display_startup_off );
$is_ok = ( $is_ok || 'off' === $display_startup_off );
}
return $is_ok;
}

/**
Expand Down

0 comments on commit 6469c58

Please sign in to comment.