79344979

Date: 2025-01-10 08:11:03
Score: 0.5
Natty:
Report link

Escape the value with addcslashes:

$orConstraints = [];
$orConstraints[] = $query->like('productname',  '%' . addcslashes($name, '_%') . '%');
$orConstraints[] = $query->like('tradename','%' . addcslashes($name, '_%') . '%');
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Stefan Frömken