Skip to content

Commit 865f7d4

Browse files
committed
Displaying all errors even if error_reporting in poorly configured
1 parent a04769f commit 865f7d4

23 files changed

+149
-149
lines changed

src/direct/analyze_includes.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
10-
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
10+
1111
/**
1212
* Analyses all included PHP files to detect whether one is not behaving correctly (outputing some text, which is strictly forbidden)
1313
*/
@@ -19,7 +19,7 @@
1919

2020
ini_set('display_errors', 1);
2121
// Add E_ERROR to error reporting if it is not already set
22-
error_reporting(E_ERROR | error_reporting());
22+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
2323

2424
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2525
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/analyze_includes_2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
ini_set('display_errors', 1);
2424

2525
// Add E_ERROR to error reporting if it is not already set
26-
error_reporting(E_ERROR | error_reporting());
26+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
2727

2828
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2929
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/config_complete_validator.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
1010

11-
use Mouf\MoufManager;
11+
use Mouf\MoufManager;
1212

1313
ini_set('display_errors', 1);
1414
// Add E_ERROR to error reporting it it is not already set
15-
error_reporting(E_ERROR | error_reporting());
15+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
1616

1717
// This validator checks that all the config parameters defined are present in the config.php file.
1818

src/direct/get_all_classes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
ini_set('display_errors', 1);
1616
// Add E_ERROR to error reporting it it is not already set
17-
error_reporting(E_ERROR | error_reporting());
17+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
1818

1919
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2020
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/get_class.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
10-
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
10+
1111

12-
use Mouf\Reflection\MoufReflectionClass;
12+
use Mouf\Reflection\MoufReflectionClass;
1313

1414
ini_set('display_errors', 1);
1515
// Add E_ERROR to error reporting it it is not already set
16-
error_reporting(E_ERROR | error_reporting());
16+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
1717

1818
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
1919
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/get_class_map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
ini_set('display_errors', 1);
2323
// Add E_ERROR to error reporting if it is not already set
24-
error_reporting(E_ERROR | error_reporting());
24+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
2525

2626
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2727
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/get_components_list.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
10-
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
10+
1111
/**
1212
* Returns a serialized string representing the array for all components declares (classes with the @Component annotation)
1313
*/
1414

1515

1616
ini_set('display_errors', 1);
1717
// Add E_ERROR to error reporting it it is not already set
18-
error_reporting(E_ERROR | error_reporting());
18+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
1919

2020
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2121
define('ROOT_URL', $_SERVER['BASE']."/../../../");

src/direct/get_defined_constants.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
10-
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
10+
1111

1212

1313
ini_set('display_errors', 1);
1414
// Add E_ERROR to error reporting it it is not already set
15-
error_reporting(E_ERROR | error_reporting());
15+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
1616

1717
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
1818
$fileName = dirname(__FILE__)."/../../../../../config.php";

src/direct/get_enhanced_components_list.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<?php
2-
/*
3-
* This file is part of the Mouf core package.
4-
*
5-
* (c) 2012 David Negrier <[email protected]>
6-
*
7-
* For the full copyright and license information, please view the LICENSE.txt
8-
* file that was distributed with this source code.
9-
*/
10-
2+
/*
3+
* This file is part of the Mouf core package.
4+
*
5+
* (c) 2012 David Negrier <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE.txt
8+
* file that was distributed with this source code.
9+
*/
10+
1111
/**
1212
* Returns a serialized string representing the array for all components declarations (classes with the @Component annotation),
1313
* along additional interesting infos (subclasses, name of the declaration file, etc...)
1414
*/
1515

1616

17-
use Mouf\Moufspector;
17+
use Mouf\Moufspector;
1818

19-
use Mouf\MoufManager;
19+
use Mouf\MoufManager;
2020

2121
ini_set('display_errors', 1);
2222
// Add E_ERROR to error reporting it it is not already set
23-
error_reporting(E_ERROR | error_reporting());
23+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
2424

2525
// Disable output buffering
2626
while (ob_get_level() != 0) {

src/direct/get_instance_details.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
ini_set('display_errors', 1);
1818
// Add E_ERROR to error reporting it it is not already set
19-
error_reporting(E_ERROR | error_reporting());
19+
error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | error_reporting());
2020

2121
if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") {
2222
define('ROOT_URL', $_SERVER['BASE']."/../../../");

0 commit comments

Comments
 (0)