PHP7 fixes

This commit is contained in:
ruben- 2016-08-15 20:03:58 +02:00
parent e9f60c5cee
commit e747de99c8
3 changed files with 4 additions and 4 deletions

View file

@ -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="&gt;=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 ) {

View file

@ -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' );

View file

@ -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();