Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 8.2 error #1016

Open
codephp1999 opened this issue Jun 17, 2023 · 1 comment · May be fixed by #1018
Open

php 8.2 error #1016

codephp1999 opened this issue Jun 17, 2023 · 1 comment · May be fixed by #1018

Comments

@codephp1999
Copy link

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

RivenSkaye added a commit to RivenSkaye/PHP-MySQLi-Database-Class that referenced this issue Jul 24, 2023
@RivenSkaye RivenSkaye linked a pull request Jul 25, 2023 that will close this issue
@BataBoom
Copy link

BataBoom commented Sep 7, 2023

$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.

stormwalkerec added a commit to stormwalkerec/php-mysqli-database-class that referenced this issue Mar 31, 2024
Fixes ThingEngineer#1016 by setting the defaults to an empty string; This matches nothing without notices about nulls.
Fixes ThingEngineer#1013 by defaulting to false instead of not initializing.
Fixes ThingEngineer#1015 by adding the missing null in the docstring. Re-aligned the other lines and fixed a typo.
Fixes ThingEngineer#1001 by special handling of stdClass objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants