r90361 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r90360
|
r90361
|
r90362
>
Date:
20:11, 18 June 2011
Author:
platonides
Status:
resolved
Tags:
Comment:
There is a nice $limit parameter in PHP 5.4, but calling debug_backtrace on earlier versions with too much parameters, it errors returning null, so we need a PHP_VERSION comparison.
Modified paths:
/trunk/phase3/includes/GlobalFunctions.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/GlobalFunctions.php
—
—
@@ -1381,7 +1381,11 @@
1382
1382
return array();
1383
1383
}
1384
1384
1385
- return array_slice( debug_backtrace(), 1 );
1385
+ if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
1386
+ return array_slice( debug_backtrace( DEBUG_BACKTRACE_PROVIDE_OBJECT, 1 ), 1 );
1387
+ } else {
1388
+ return array_slice( debug_backtrace(), 1 );
1389
+ }
1386
1390
}
1387
1391
1388
1392
/**
Follow-up revisions
Revision
Commit summary
Author
Date
r90362
Follow up
r90361
platonides
20:15, 18 June 2011
r95493
Followup
r90361
,
r90362
...
reedy
16:40, 25 August 2011
Status & tagging log
16:40, 25 August 2011
Reedy
(
talk
|
contribs
)
changed the
status
of r90361
[
removed:
fixme
added:
resolved]
22:18, 21 June 2011
Aaron Schulz
(
talk
|
contribs
)
changed the
status
of r90361
[
removed:
new
added:
fixme]