Skip to content

Commit d37c989

Browse files
vistartcebe
authored andcommitted
Fix the escape bug.
Fix the escape bug. See detail in #22 fixes #22 close #27
1 parent fab6866 commit d37c989

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii Framework 2 redis extension Change Log
44
2.0.5 under development
55
-----------------------
66

7+
- Bug #22: Fixed string escaping issue in LuaScriptBuilder (vistart)
78
- Bug #37: Fixed detection of open socket (mirocow)
89
- Bug #46: Fixed bug to execute session_regenerate_id in PHP 7.0 (githubjeka)
910
- Chg #14: Added missing `BLPOP` to `$redisCommands` (samdark)

LuaScriptBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private function quoteValue($str)
215215
return $str;
216216
}
217217

218-
return "'" . addcslashes(str_replace("'", "\\'", $str), "\000\n\r\\\032") . "'";
218+
return "'" . addcslashes($str, "\000\n\r\\\032\047") . "'";
219219
}
220220

221221
/**

0 commit comments

Comments
 (0)