From e2250a3f99605fe11be5d572936f2bef075f2ad0 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Tue, 31 May 2011 19:47:32 +0100 Subject: [PATCH] E_ALL fixes. --- libraries/db_routines.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/db_routines.inc.php b/libraries/db_routines.inc.php index 74d006c3ec..926f3c69e9 100644 --- a/libraries/db_routines.inc.php +++ b/libraries/db_routines.inc.php @@ -144,6 +144,15 @@ function getRoutineParameters($parsed_query, $routine_type) $retval['length'][] = htmlentities($param_length, ENT_QUOTES); // FIXME: parameter attributes, such as 'UNSIGNED', are currenly silently ignored } + + // Since some indices of $retval may be still undefined, we fill + // them each with an empty array to avoid E_ALL errors in PHP. + foreach (array('dir', 'name', 'type', 'length') as $key => $index) { + if (! isset($retval[$index])) { + $retval[$index] = array(); + } + } + return $retval; } // end getRoutineParameters()