top-think / top-think/think-orm
2.0版本里的问题,substr_replace要求传入的要保存的数组里每个成员都是字符串
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
Uncaught TypeError: substr_replace(): Argument #2 ($replace) must be of type array|string, int given in .\vendor\topthink\think-orm\src\db\Connection.php:1322
$new['status']='0'; // 这样才可以,但我库里定义的就是int类型,不是字符串
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at vendor/topthink/think-orm/src/db/Connection.php:1322 and reproduce the error with an integer status value such as 0, comparing it with the string value '0'. Trace the value passed to substr_replace and consider the issue complete when integer-valued updates no longer trigger this TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100