mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Show warning when custom query is executed using unsafe methods like _query() and _fetch()
This commit is contained in:
parent
4cf8fc6eb5
commit
34922b0d46
1 changed files with 2 additions and 0 deletions
|
|
@ -1301,6 +1301,7 @@ class DB
|
|||
*/
|
||||
public function _query($query_string): ?Helpers\DBStmtHelper
|
||||
{
|
||||
trigger_error('Custom query using unsafe method', \E_USER_WARNING);
|
||||
if ($this->_debug_comment)
|
||||
{
|
||||
$query_string .= "\n" . sprintf('/* _query() %s */', \RX_CLIENT_IP);
|
||||
|
|
@ -1323,6 +1324,7 @@ class DB
|
|||
*/
|
||||
public function _fetch($stmt, int $last_index = 0)
|
||||
{
|
||||
trigger_error('Custom query using unsafe method', \E_USER_WARNING);
|
||||
return $this->fetch($stmt, $last_index);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue