From: skodak Date: Wed, 19 Nov 2008 23:20:46 +0000 (+0000) Subject: MDL-17317 lets make Netbeans happy, it is not clever enough to detect undefined vars... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3e51b51d05e6fc8b804d4adb6915b6dee83d001e;p=moodle.git MDL-17317 lets make Netbeans happy, it is not clever enough to detect undefined vars properly ;-) --- diff --git a/lib/dml/moodle_database.php b/lib/dml/moodle_database.php index ba72a1df72..abe7436622 100644 --- a/lib/dml/moodle_database.php +++ b/lib/dml/moodle_database.php @@ -467,6 +467,8 @@ abstract class moodle_database { throw new dml_exception('invalidqueryparam', $a); } + $target_type = $allowed_types; + if ($type & $allowed_types) { // bitwise AND if ($count == count($params)) { if ($type == SQL_PARAMS_QM) { @@ -477,9 +479,6 @@ abstract class moodle_database { } // needs some fixing or validation - there might be more params than needed $target_type = $type; - - } else { - $target_type = $allowed_types; } if ($type == SQL_PARAMS_NAMED) {