top-think / top-think/think-orm
PDOConnection 694 行与think-cache 有点冲突了
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
现在最新2.06版 think-cache get方法默认返回false了,
public function get($name, $default = false)
然后PDOConnection 694行那缓存判断是null
if (null !== $data ) {
return $data;
}
导致没缓存一样把$data返回去了,报错: Return value must be of type array, bool returned in
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
Inspect PDOConnection around line 694 and compare its null cache check with think-cache 2.06's get($name, $default = false) behavior. Reproduce the cache-miss path that produces the declared array/bool return error, then verify the cache miss is handled without returning false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100