There is an incorrect comparison in the ARC2_StoreSelectQueryHandler.php file. The PDO::exec function returns false on error, and to check this strictly, === should be used instead of ==.
The current comparison uses ==., which can lead to unexpected results since PDO::exec also returns the number of affected rows on success. To properly check if the method failed, a strict comparison === should be used.
Proposed solution
Modify the affected line to use === instead of ==.
Reference
For more information, you can refer to the official PHP documentation on PDO::exec: PDO::exec - Manual
Hello,
There is an incorrect comparison in the ARC2_StoreSelectQueryHandler.php file. The PDO::exec function returns false on error, and to check this strictly,
===
should be used instead of==
.Details
Affected file https://github.com/semsol/arc2/blob/3e08bc2af723496967bcdedff663e8094f6e5e66/store/ARC2_StoreSelectQueryHandler.php#L183
Issue
The current comparison uses
==
., which can lead to unexpected results since PDO::exec also returns the number of affected rows on success. To properly check if the method failed, a strict comparison===
should be used. Proposed solutionModify the affected line to use
===
instead of==
.Reference
For more information, you can refer to the official PHP documentation on PDO::exec: PDO::exec - Manual