Skip to content

Commit

Permalink
Add deprecation notice to escapeString
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Nov 9, 2021
1 parent 3bf0e1b commit 835f928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/eventum/class.db_helper.php
Expand Up @@ -92,6 +92,7 @@ public static function get_last_insert_id(): int
* @param string $str The string that needs to be escaped
* @param bool $add_quotes Whether to add quotes around result as well
* @return string The escaped string
* @deprecated Using this is bad design, must use placeholders in query
*/
public static function escapeString($str, $add_quotes = false): string
{
Expand Down
2 changes: 1 addition & 1 deletion lib/eventum/class.misc.php
Expand Up @@ -289,7 +289,7 @@ public static function stripInput(&$value): void
*
* @param string|array $input The original string
* @return string|array The escaped (or not) string
* @deprecated Using this is bad design, must use placeholders in query
* @deprecated Using this is bad design, must use placeholders in query. and $add_quote=false is unsafe if used improperly
*/
public static function escapeString($input, $add_quotes = false)
{
Expand Down

0 comments on commit 835f928

Please sign in to comment.