Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#7 コメント 11 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php, redis
領域
databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

这边实在协程环境发现的但是也发现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)

主要言語
PHP
スター
3
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

webman-php/think-cache のほかの issue

webman-php/think-cache の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。