Skip to content

Conversation

@jrauh01
Copy link
Contributor

@jrauh01 jrauh01 commented Aug 11, 2025

Replaced the unused Zend_Config_Exception with a more appropriate NotWritableError in IniWriter::write().

  • The old Zend_Config_Exception was never caught anywhere in the codebase.
  • Changed to NotWritableError to better reflect file permission and write issues.
  • Added @ suppression to the file_put_contents() call so that the method can throw NotWritableError instead of crashing on PHP warnings.

sukhwinder33445
sukhwinder33445 previously approved these changes Nov 6, 2025
Copy link
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nilmerg pushed a commit to Icinga/icingadb-web that referenced this pull request Nov 17, 2025
If saving the Redis settings fails due to a write error, the desired
configuration file content is now displayed so that the user can deploy
it manually (Same behavior as with database configuration).

For that a catch block is introduced on the `NotWritableError` that is
added to `IniWriter::write()` in
Icinga/icingaweb2#5404.

Refs Icinga/icingaweb2#5404
Resolves #1269
@nilmerg nilmerg added this to the 2.13 milestone Nov 17, 2025
@nilmerg nilmerg added the affects-upgrades The change requires migration or user awareness label Nov 17, 2025
@nilmerg
Copy link
Member

nilmerg commented Nov 17, 2025

Please add a note to the upgrading documentation

@jrauh01 jrauh01 requested a review from nilmerg November 17, 2025 14:29
nilmerg pushed a commit to Icinga/icingadb-web that referenced this pull request Nov 19, 2025
If saving the Redis settings fails due to a write error, the desired
configuration file content is now displayed so that the user can deploy
it manually (Same behavior as with database configuration).

For that a catch block is introduced on the `NotWritableError` that is
added to `IniWriter::write()` in
Icinga/icingaweb2#5404.

Refs Icinga/icingaweb2#5404
Resolves #1269

(cherry picked from commit 3c72286)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects-upgrades The change requires migration or user awareness cla/signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants