You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type of Database (MySQL, MSSQL, SQLite...): Postgresql
System (Liunx|Windows|Mac):Linux
Describe the Problem
执行log()方法报错
TypeError: Medoo\Medoo::quote(): Argument #1 ($string) must be of type string, float given, called in /www/webman/vendor/catfan/medoo/src/Medoo.php on line 607 and defined in /www/webman/vendor/catfan/medoo/src/Medoo.php:696
Stack trace: #0 /www/webman/vendor/catfan/medoo/src/Medoo.php(607): Medoo\Medoo->quote(555.1) #1 /www/webman/vendor/catfan/medoo/src/Medoo.php(2205): Medoo\Medoo->generate('UPDATE "page" S...', Array) #2 [internal function]: Medoo\Medoo->Medoo\{closure}(Array) #3 /www/webman/vendor/catfan/medoo/src/Medoo.php(2203): array_map(Object(Closure), Array) #4 /www/webman/app/wmapi/controller/PageController.php(215): Medoo\Medoo->log()
The text was updated successfully, but these errors were encountered:
catfan
changed the title
log() 方法报错,类型判断有问题 'double' => PDO::PARAM_STR
The log() method reports an error, there is a problem with type judgment 'double' => PDO::PARAM_STR.
Jan 15, 2024
Information
Describe the Problem
执行log()方法报错
TypeError: Medoo\Medoo::quote(): Argument #1 ($string) must be of type string, float given, called in /www/webman/vendor/catfan/medoo/src/Medoo.php on line 607 and defined in /www/webman/vendor/catfan/medoo/src/Medoo.php:696
Stack trace:
#0 /www/webman/vendor/catfan/medoo/src/Medoo.php(607): Medoo\Medoo->quote(555.1)
#1 /www/webman/vendor/catfan/medoo/src/Medoo.php(2205): Medoo\Medoo->generate('UPDATE "page" S...', Array)
#2 [internal function]: Medoo\Medoo->Medoo\{closure}(Array)
#3 /www/webman/vendor/catfan/medoo/src/Medoo.php(2203): array_map(Object(Closure), Array)
#4 /www/webman/app/wmapi/controller/PageController.php(215): Medoo\Medoo->log()
问题出在
Medoo/src/Medoo.php
Line 749 in eb1ad19
这里 double 类型被看做了字符串,但是555.1不是字符串,
导致调用quote函数时参数类型检查错误
Medoo/src/Medoo.php
Line 607 in eb1ad19
请看看这个如何修改,或者是在调用的时候,类型强制转换为 string
The text was updated successfully, but these errors were encountered: