Skip to content

Commit

Permalink
support non-falsy-string in rex_sql::escape() (#5350)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Oct 4, 2022
1 parent 18ec367 commit 78eeea1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions redaxo/src/core/lib/sql/sql.php
Expand Up @@ -1405,7 +1405,10 @@ private function fetchMeta()
* @param string $value den zu escapenden Wert
*
* @return string
* @psalm-return ($value is numeric-string ? numeric-string : ($value is non-empty-string ? non-empty-string : string))
* @psalm-return ($value is numeric-string ? numeric-string :
* ($value is non-falsy-string ? non-falsy-string :
* ($value is non-empty-string ? non-empty-string : string
* )))
*/
public function escape($value)
{
Expand All @@ -1429,7 +1432,10 @@ public function escapeIdentifier($name)
/**
* Escapes the `LIKE` wildcard chars "%" and "_" in given value.
*
* @psalm-return ($value is numeric-string ? numeric-string : ($value is non-empty-string ? non-empty-string : string))
* @psalm-return ($value is numeric-string ? numeric-string :
* ($value is non-falsy-string ? non-falsy-string :
* ($value is non-empty-string ? non-empty-string : string
* )))
*/
public function escapeLikeWildcards(string $value): string
{
Expand Down

0 comments on commit 78eeea1

Please sign in to comment.