Project

General

Profile

Actions

Feature #51376

closed

Show sting values for configured [SYS][exceptionalErrors] and similar codes

Added by Michiel Roos over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2013-08-27
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.4
Tags:
Complexity:
Sprint Focus:

Description

There are several configuration options in the install tool that show a numerical representation of PHP error codes:
  • [SYS][errorHandlerErrors]
  • [SYS][exceptionalErrors]
  • [SYS][syslogErrorReporting]
  • [SYS][belogErrorReporting]

A viewhelper can be made to translate these numbers to strings, so the admin can see the textual configuration of the current value above the input field.

    /**
     * Convert PHP error_reporting integer to string
     *
     * @param $value
     * @return array
     */
    public static function error2string($value) {
        $levelNames = array(
            E_ERROR => 'E_ERROR', E_WARNING => 'E_WARNING',
            E_PARSE => 'E_PARSE', E_NOTICE => 'E_NOTICE',
            E_CORE_ERROR => 'E_CORE_ERROR', E_CORE_WARNING => 'E_CORE_WARNING',
            E_COMPILE_ERROR => 'E_COMPILE_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNING',
            E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING',
            E_USER_NOTICE => 'E_USER_NOTICE' );
        if (defined('E_STRICT')) {
            $levelNames[E_STRICT] = 'E_STRICT';
        }
        $levels = array();
        if (($value&E_ALL) == E_ALL) {
            $levels[] = 'E_ALL';
            $value &= ~E_ALL;
        }
        foreach ($levelNames as $level => $name) {
            if (($value&$level) == $level) {
                $levels[] = $name;
            }
        }
        return $levels;
    }
Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #6

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #7

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #8

Updated by Gerrit Code Review over 10 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23794

Actions #9

Updated by Wouter Wolters over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF