%? no longer handles arrays and hashes for security purposes

those are moved into %l?, %ll?, %hc, %ha, %ho for different uses
This commit is contained in:
Sergey Tsalkov
2014-10-26 07:20:51 +00:00
parent 0474a41a56
commit e0660a9368
3 changed files with 65 additions and 35 deletions

View File

@@ -214,7 +214,7 @@ class BasicTest extends SimpleTest {
'height' => 199.194
));
$ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s AND height=%d", 'gonesoon', 199.194);
$ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE %ha", array('username' => 'gonesoon', 'height' => 199.194));
$this->assert(intval($ct) === 1);
$ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s1 AND height=%d0 AND height=%d", 199.194, 'gonesoon');