Skip to content

Notice or user deprecation causing report page #33812

@ihor-sviziev

Description

@ihor-sviziev

This is a follow-up on #31985. That issue caused such big issue due to handling notices, deprecation, or user deprecation as an exception.

According to https://www.php.net/manual/en/errorfunc.constants.php, it feels like we should treat the following types as a non-critical issue and just add a log message to the log file:

  • E_NOTICE
  • E_USER_NOTICE
  • E_DEPRECATED
  • E_USER_DEPRECATED

It's better to convert these types to exceptions only in developer mode

Not sure if it's good or bad thing, would like to discuss it

Preconditions (*)

  1. Magento 2.3.7-p1, 2.4.3, 2.4-develop
  2. Production mode enabled
  3. PHP 7.4

Steps to reproduce (*)

  1. Add some code that should trigger notice to the cms/index/index controller, example:
$test = false;
if ($test['some-key']) {
    // some code here 
}
  1. Go to the homepage

Expected result (*)

  1. The homepage should be shown w/o any issues
  2. The Notice message should be written in logs

Actual result (*)

  1. We have Magento report page, and Notice was converted to Exception

Please provide Severity assessment for the Issue as a Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: ready for confirmationSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions