Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

错误Call to a member function exists() on null in Redis

Aperta
#7 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php, redis
Ambito
databases

Direzione di ricerca

Start at vendor/webman/think-cache/src/driver/Redis.php line 84 and review how the Redis connection is initialized and obtained after the pool returns to its minimum size. Reproduce the failure in a coroutine and select environment using the reported sequence, then verify that the Redis exists() operation no longer calls a null connection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

这边实在协程环境发现的但是也发现select下也有这个问题

Image

这边发现初始化启动时候调用redis操作可以 但是一旦连接池回归最小连接数 然后再次调用redis操作获取的链接调用函数就会报错
如下:
Image

Error: Call to a member function exists() on null in E:\projects\php\zhsq\server\vendor\webman\think-cache\src\driver\Redis.php:84
Stack trace:
#0 E:\projects\php\zhsq\server\vendor\topthink\think-orm\src\db\PDOConnection.php(874): Webman\ThinkCache\driver\Redis->has('think_zhsq_serv...')
#1 E:\projects\php\zhsq\server\vendor\topthink\think-orm\src\db\PDOConnection.php(1167): think\db\PDOConnection->pdoExecute(Object(think\db\Query), 'UPDATE `la_user...')
#2 E:\projects\php\zhsq\server\vendor\topthink\think-orm\src\db\BaseQuery.php(1369): think\db\PDOConnection->update(Object(think\db\Query))
#3 E:\projects\php\zhsq\server\vendor\topthink\think-orm\src\Model.php(738): think\db\BaseQuery->update(Array)

Lingua principale
PHP
Stelle
3
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webman-php/think-cache

Tutte le issue di webman-php/think-cache

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.