PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

php 8.2 error

Open codephp1999 opened this issue 2 years ago • 1 comments

please fix it str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in ...MysqliDb.php on line 2354

codephp1999 avatar Jun 17 '23 22:06 codephp1999

$currentDatetime = Carbon::now();
Error Query: $db->rawQuery("SELECT * FROM `am_store` WHERE `expires` < ".$currentDatetime->toDateTimeString());
Temporary Fix Query: $db->rawQuery("SELECT * FROM `am_store` WHERE `expires` < "."'".$currentDatetime->toDateTimeString()."'"); 

php verison 8.2.10 DEPRECATED str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in vendor/thingengineer/mysqli-database-class/MysqliDb.php on line 559.

mysqli_sql_exception

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 05:00:56' at line 1

at vendor/thingengineer/mysqli-database-class/MysqliDb.php:1995

$db->where ("expires", "<", $currentDatetime->toDateTimeString());
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '  2023-  09-  07   05:08:55 ?' at line   1

Appears to add wonky spaces.

BataBoom avatar Sep 07 '23 03:09 BataBoom