Bug #23099 » 14997_v3.diff
t3lib/class.t3lib_db.php (working copy) | ||
---|---|---|
* @see quoteStr()
|
||
*/
|
||
function escapeStrForLike($str, $table) {
|
||
return preg_replace('/[_%]/', '\\\$0', $str);
|
||
return addcslashes($str, '_%');
|
||
}
|
||
/**
|
tests/t3lib/t3lib_dbTest.php (working copy) | ||
---|---|---|
);
|
||
}
|
||
/////////////////////////////////////////////////
|
||
// Tests concerning escapeStringForLikeComparison
|
||
/////////////////////////////////////////////////
|
||
/**
|
||
* @test
|
||
*/
|
||
public function escapeStringForLikeComparison() {
|
||
$this->assertEquals(
|
||
'foo\_bar\%',
|
||
$this->fixture->escapeStrForLike('foo_bar%', 'table')
|
||
);
|
||
}
|
||
}
|
||
?>
|
- « Previous
- 1
- 2
- 3
- Next »