Avoid undefined enabled-key warnings in limitation checks
メンテナーはふだん 1 日以内に返信
@superdav42 がすでに取り組んでいます。
2026年10月7日 から。
評価
この issue はまだ評価されていません。
説明
Bug and reproduction
On PHP 8.4, Limitations::has_limitations() emits Undefined array key "enabled" when a module contains configuration but no explicit enabled flag. A synthetic example is new Limitations(['users' => ['limit' => 5]]).
is_module_enabled() already treats an absent enabled flag as disabled. has_limitations() should do the same without emitting warnings, while preserving truthy/falsey legacy flags and enabled modules later in the list.
Implementation files and pattern
inc/objects/class-limitations.php: use a presence-safe truthiness check inhas_limitations(); preserve public signatures and stored data.tests/WP_Ultimo/Objects/Limitations_Test.php: extend the existinghasLimitationsDataProviderfor missing, empty, null, disabled, zero-string, truthy legacy and mixed module data.
Verification
- Source and test syntax checks pass.
- Focused PHPCS and PHPStan checks pass.
- A database-free runtime check covers eight module configurations without warnings.
- The existing PHPUnit provider covers the original and new cases; no new test infrastructure or production changes are introduced by the fix.
aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-6.1-sol spent 22h 2m and 1,270,263 tokens on this with the user in an interactive session.
- 主要言語
- PHP
- スター
- 218
- フォーク
- 87
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 85
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Ultimate-Multisite/ultimate-multisite のほかの issue
-
perf: lazy-load the top My Sites toolbar and defer initial site-list hydration対応中かも @superdav42 が 2 日前に担当しました。 オープンenhancement origin:interactive priority:medium status:in-review tier:standard
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Ultimate-Multisite/ultimate-multisite#2015 · コメント 6 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Secondary networks: sunrise queries unregistered scoped tables, and wu_{N}_* tables are never created対応中かも @superdav42 が 3 日前に担当しました。 オープンbug origin:interactive status:in-review
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Ultimate-Multisite/ultimate-multisite#2012 · コメント 13 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Secondary networks never get Ultimate Multisite tables created or upgraded対応中かも @superdav42 が 4 日前に担当しました。 オープンbug origin:interactive status:claimed
Ultimate-Multisite/ultimate-multisite#2009 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
needs-maintainer-review review:approve triage-failed
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
Ultimate-Multisite/ultimate-multisite#1952 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
auto-dispatch needs-investigation origin:worker security status:available tier:standard type:bug
難易度 3/5 半日 初心者へのやさしさ 30/100
Ultimate-Multisite/ultimate-multisite#1938 ·
メンテナーはふだん 1 日以内に返信
Ultimate-Multisite/ultimate-multisite の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
backdrop-contrib/paragraphs#299 ·
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
landsman/adminer-desktop#206 ·
メンテナーはふだん 1 日以内に返信
-
Explosm: Cyanide & Happiness failed with: https://explosm.net/comics/latest#comic resulted in 307オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RSS-Bridge/rss-bridge#5154 ·
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 2 日以内に返信