Skip to content

Commit

Permalink
Disabling error logging when analyzing classes
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Aug 2, 2018
1 parent c2914a4 commit d669f3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/direct/analyze_includes_2.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}

ini_set('display_errors', 1);

// Add E_ERROR to error reporting if it is not already set
error_reporting(E_ERROR | error_reporting());

Expand Down Expand Up @@ -62,16 +63,21 @@
$componentsList = array();
*/

$logErrors = ini_get('log_errors');

echo "FDSFZEREZ_STARTUP\n";
if (is_array($classMap)) {
foreach ($classMap as $className => $fileName) {
echo "X4EVDX4SEVX5_BEFOREINCLUDE\n";
echo $className."\n";

ini_set('log_errors', 0);
if (!class_exists($className)) {
echo "Error. Could not load class '".$className."' from file '".$fileName."'. This is probably an autoloader issue.
Please check that your class respects PSR-0 or PSR-4 naming standards";
}
ini_set('log_errors', $logErrors);

// If we manage to get here, there has been no error loading $className. Youhou, let's output an encoded "OK"
echo "DSQRZREZRZER__AFTERINCLUDE\n";
Expand Down

0 comments on commit d669f3e

Please sign in to comment.