Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4596a4
)
Better way to detect whether a function exists in this version of PHP before redefini...
author
tjhunt
<tjhunt>
Tue, 3 Apr 2007 08:34:39 +0000
(08:34 +0000)
committer
tjhunt
<tjhunt>
Tue, 3 Apr 2007 08:34:39 +0000
(08:34 +0000)
lib/weblib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/weblib.php
b/lib/weblib.php
index
45d7d2e
..
36b2c71
100644
(file)
--- a/
lib/weblib.php
+++ b/
lib/weblib.php
@@
-4981,7
+4981,7
@@
function notice_yesno ($message, $linkyes, $linkno, $optionsyes=NULL, $optionsno
* Provide an definition of error_get_last for PHP before 5.2.0. This simply
* returns NULL, since there is not way to get the right answer.
*/
-if (!
version_compare(phpversion(), '5.2.0') >= 0
) {
+if (!
function_exists('error_get_last')
) {
// the eval is needed to prevent PHP 5.2+ from getting a parse error!
eval('
function error_get_last() {