From 5355fb1eaf98b0a3cecdd78b7d9d97f381c4e40c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 14 Aug 2007 03:46:05 +0000 Subject: [PATCH] Fixing "method not found" for BSApp::GetType() * Input.php: (BSInput::escape) --- Input.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Input.php b/Input.php index 0f52515..635c8d0 100644 --- a/Input.php +++ b/Input.php @@ -210,19 +210,20 @@ class BSInput */ public function escape($str, $force = true) { + $db = BSApp::Registry()->getType('Db'); if ($this->magicquotes AND !$force) { - if (BSApp::GetType('Db')) + if ($db) { - return BSApp::GetType('Db')->escapeString(str_replace(array("\'", '\"'), array("'", '"'), $str)); + return $db->escapeString(str_replace(array("\'", '\"'), array("'", '"'), $str)); } return $str; } else { - if (BSApp::GetType('Db')) + if ($db) { - return BSApp::GetType('Db')->escapeString($str); + return $db->escapeString($str); } return addslashes($str); } -- 2.43.5