From: Aaron Schulz Date: Mon, 25 Jul 2011 20:11:00 +0000 (+0000) Subject: Make Chad happy ;) X-Git-Tag: 1.31.0-rc.0~28630 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=e657d50e47f7beb72a4706ed20785abbfe83d779;p=lhc%2Fweb%2Fwiklou.git Make Chad happy ;) --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 075b121f79..7be3b3d80d 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -139,14 +139,15 @@ abstract class Maintenance { */ public static function shouldExecute() { $bt = debug_backtrace(); - if ( count( $bt ) < 2 ) { + $count = count( $bt ); + if ( $count < 2 ) { return false; // sanity } if ( $bt[0]['class'] !== 'Maintenance' || $bt[0]['function'] !== 'shouldExecute' ) { return false; // last call should be to this function } - $includeFuncs = array( 'require_once', 'require', 'include', 'include_once' ); - for( $i=1; $i < count( $bt ); $i++ ) { + $includeFuncs = array( 'require_once', 'require', 'include' ); + for( $i=1; $i < $count; $i++ ) { if ( !in_array( $bt[$i]['function'], $includeFuncs ) ) { return false; // previous calls should all be "requires" }