From 88aba6189ba310a0e766cf7cbd139fc3593c3e88 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 18 May 2006 22:10:40 +0000 Subject: [PATCH] deprecated nvl() function similar to optional_variable() - fixed missing global $CFG --- lib/weblib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/weblib.php b/lib/weblib.php index 13eb5ea24e7..1406223504b 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -142,6 +142,8 @@ function p($var, $strip=false) { * @return mixed */ function nvl(&$var, $default='') { + global $CFG; + if (!empty($CFG->disableglobalshack)) { error( "The nvl() function is deprecated ($var, $default)." ); }