mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-05 09:19:53 +08:00
PHP7 fixes
This commit is contained in:
parent
e9f60c5cee
commit
e747de99c8
3 changed files with 4 additions and 4 deletions
|
@ -339,7 +339,7 @@ class MainWP_Child_Back_WP_Up {
|
|||
echo '<tr title=""><td>' . __( 'Operating System', 'backwpup' ) . '</td><td>' . esc_html( PHP_OS ) . '</td></tr>';
|
||||
echo '<tr title=""><td>' . __( 'PHP SAPI', 'backwpup' ) . '</td><td>' . esc_html( PHP_SAPI ) . '</td></tr>';
|
||||
echo '<tr title=""><td>' . __( 'Current PHP user', 'backwpup' ) . '</td><td>' . esc_html( get_current_user() ) . '</td></tr>';
|
||||
$text = (bool) ini_get( 'safe_mode' ) ? __( 'On', 'backwpup' ) : __( 'Off', 'backwpup' );
|
||||
$text = version_compare(phpversion(), '5.3.0') < 0 && (bool) ini_get( 'safe_mode' ) ? __( 'On', 'backwpup' ) : __( 'Off', 'backwpup' );
|
||||
echo '<tr title=""><td>' . __( 'Safe Mode', 'backwpup' ) . '</td><td>' . $text . '</td></tr>';
|
||||
echo '<tr title=">=30"><td>' . __( 'Maximum execution time', 'backwpup' ) . '</td><td>' . ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'backwpup' ) . '</td></tr>';
|
||||
if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
|
||||
|
|
|
@ -1171,7 +1171,7 @@ class MainWP_Child_Server_Information {
|
|||
}
|
||||
|
||||
protected static function getPHPSafeMode() {
|
||||
if ( ini_get( 'safe_mode' ) ) {
|
||||
if ( version_compare(phpversion(), '5.3.0') < 0 && ini_get( 'safe_mode' ) ) {
|
||||
$safe_mode = __( 'ON' );
|
||||
} else {
|
||||
$safe_mode = __( 'OFF' );
|
||||
|
|
|
@ -1002,8 +1002,8 @@ class MainWP_Child {
|
|||
$uploadDir = $uploadDir[0];
|
||||
$excludes[] = str_replace( ABSPATH, '', $uploadDir );
|
||||
$excludes[] = str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '/object-cache.php';
|
||||
if ( ! ini_get( 'safe_mode' ) ) {
|
||||
set_time_limit( 6000 );
|
||||
if ( version_compare(phpversion(), '5.3.0') >= 0 || ! ini_get( 'safe_mode' ) ) {
|
||||
@set_time_limit( 6000 );
|
||||
}
|
||||
|
||||
$newExcludes = array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue