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

PHP warnings in SettingsService.php when saving Notes settings (_route treated as setting)

オープン 初心者向け
#2,054 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

lib/Service/SettingsService.php の 165 行目付近から始め、属性の検索と存在チェックの順序を確認してください。Notes の設定を保存し、nextcloud.log で /index.php/apps/notes/settings への PUT リクエストを確認して再現してください。リクエストパラメータ(_route など)が設定として無視され、保存時に PHP の警告が発生しなければ完了です。

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

説明

bug need to reproduce

When Notes settings are saved, Notes 6.1.0 generates PHP warnings in
lib/Service/SettingsService.php line 165.

The request contains _route, which appears to be handled as if it were a
Notes setting. SettingsService.php accesses $this->attrs[$name]['default']
on line 165 before checking array_key_exists($name, $this->attrs) on the
following line.

Each affected PUT request to /index.php/apps/notes/settings generated
multiple PHP warnings.

Steps to reproduce

  1. Open the Notes app.
  2. Change/save a Notes setting.
  3. Check nextcloud.log.
Expected behaviour

Notes settings should be saved without PHP warnings. Request parameters such
as _route should not be treated as Notes settings.

Actual behaviour

Saving Notes settings generates warnings such as:

Undefined array key "_route" at
/apps/notes/lib/Service/SettingsService.php#165

Trying to access array offset on null at
/apps/notes/lib/Service/SettingsService.php#165

The warnings were associated with:

PUT /index.php/apps/notes/settings

Screenshots

Not applicable.

Server

  • Notes app version: 6.1.0
  • Nextcloud version: 35.0.1
  • OS: CloudLinux (shared hosting)
  • Web server: LiteSpeed
  • PHP version: 8.4.25
  • Database: MariaDB 11.4.13

Nextcloud configuration:

No custom changes have been made to the Notes app.

Client

  • Browser (incl. version): Chromium-based browser
  • OS: Windows

Log files

Relevant nextcloud.log warnings:

Undefined array key "_route" at
/home/malamute/public_html/files/apps/notes/lib/Service/SettingsService.php#165

Trying to access array offset on null at
/home/malamute/public_html/files/apps/notes/lib/Service/SettingsService.php#165

Both observed request IDs used:

method: PUT
url: /index.php/apps/notes/settings

主要言語
JavaScript
スター
738
フォーク
162
平均マージ
2時間 29分
マージ済み PR(30日)
42

環境構築

はじめの一歩

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

nextcloud/notes のほかの issue

nextcloud/notes の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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