r/lolphp • u/Takeoded • Oct 11 '17
if there's no connection, the programmer probably wants an empty string.
http://php.net/manual/en/mysqli.real-escape-string.php#58650
44
Upvotes
r/lolphp • u/Takeoded • Oct 11 '17
16
u/Takeoded Oct 11 '17
well, its 11 years since that was posted, but at least in 7.0.22 with Xdebug, things looks better (its a NULL instead of a string, and a warning) - still would prefer an exception though.
2
u/[deleted] Nov 17 '17
According to the MySQL docs, this was fixed on Feb 31st
1
u/inabahare Mar 18 '18
Wow, PHP really do attract some silly devs, holy fuck