From 1d51c2b6749f2b126bb21cc916e9614829727a46 Mon Sep 17 00:00:00 2001 From: Sergey Tsalkov Date: Fri, 13 Sep 2013 22:35:34 -0700 Subject: [PATCH] add additional test case for a reported bug where '%s' in data is parsed as a query placeholder I can't reproduce the bug --- simpletest/BasicTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/simpletest/BasicTest.php b/simpletest/BasicTest.php index dbd7f3f..7580a76 100644 --- a/simpletest/BasicTest.php +++ b/simpletest/BasicTest.php @@ -394,6 +394,15 @@ class BasicTest extends SimpleTest { $this->assert($r[0]['1+1'] === '2'); } + function test_901_updatewithspecialchar() { + $data = 'www.mysite.com/product?s=t-%s-%%3d%%3d%i&RCAID=24322'; + DB::update('profile', array('signature' => $data), 'id=%i', 1); + $signature = DB::queryFirstField("SELECT signature FROM profile WHERE id=%i", 1); + $this->assert($signature === $data); + } + + + }