diff options
author | Ori Livneh <ori@wikimedia.org> | 2013-02-03 19:01:17 -0800 |
---|---|---|
committer | Ori Livneh <ori@wikimedia.org> | 2013-02-04 12:50:45 -0800 |
commit | 6c163ad26532346ae30984ad1423ee4bf5aed561 (patch) | |
tree | 7470f6323737b1c34402bd6c340eeb8eccb88e2e /maintenance/dev | |
parent | 290fc4de64a8b4503c4b2a25a058b23aa1c390f4 (diff) | |
download | mediawikicore-6c163ad26532346ae30984ad1423ee4bf5aed561.tar.gz mediawikicore-6c163ad26532346ae30984ad1423ee4bf5aed561.zip |
(Bug 37957) Replace php_sapi_name() with PHP_SAPI
The PHP_SAPI constant has been available since PHP 4.2.0. It's more
concise to use the constant and has less overhead than a function call.
Furthermore, PHP_SAPI rhymes with "happy", whereas "php_sapi_name"
rhymes with "lame". QED, etc.
Change-Id: Ie8c121cb8fcef50536af8d3f66723b458f0bf9af
Diffstat (limited to 'maintenance/dev')
-rw-r--r-- | maintenance/dev/includes/router.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/maintenance/dev/includes/router.php b/maintenance/dev/includes/router.php index ac96f459d183..1d5070b1b507 100644 --- a/maintenance/dev/includes/router.php +++ b/maintenance/dev/includes/router.php @@ -21,7 +21,7 @@ * @file */ -if ( php_sapi_name() != 'cli-server' ) { +if ( PHP_SAPI != 'cli-server' ) { die( "This script can only be run by php's cli-server sapi." ); } |