Remove useless PHP version comparison from wfDebugBacktrace()
authorRicordisamoa <ricordisamoa@openmailbox.org>
Sat, 27 Feb 2016 04:21:03 +0000 (05:21 +0100)
committerRicordisamoa <ricordisamoa@openmailbox.org>
Sat, 27 Feb 2016 04:21:03 +0000 (05:21 +0100)
MediaWiki 1.27 only supports PHP 5.5.9 and above, therefore
it is no more necessary to check that the running PHP version
is equal to or greater than 5.4.0.

Change-Id: I819c625e173cbf2a54ef614d742fe01f70be8efc

includes/GlobalFunctions.php

index eb174f2..5138018 100644 (file)
@@ -1557,7 +1557,7 @@ function wfDebugBacktrace( $limit = 0 ) {
                return [];
        }
 
-       if ( $limit && version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
+       if ( $limit ) {
                return array_slice( debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit + 1 ), 1 );
        } else {
                return array_slice( debug_backtrace(), 1 );