summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-23 19:08:01 +0100
committerAndrew Dolgov <[email protected]>2005-11-23 19:08:01 +0100
commitcce28758b293bffa184f0617083691285a197032 (patch)
tree170c8b169df2e22b78389c31d66855c5db335a4c /functions.php
parent721064e1a2c463f151751e4f0dad0779077445b2 (diff)
debug request variable sets error_reporting to E_ALL
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index ed2910a2a..e479c28b7 100644
--- a/functions.php
+++ b/functions.php
@@ -1,6 +1,12 @@
<?
session_start();
+ if ($_GET["debug"]) {
+ define('DEFAULT_ERROR_LEVEL', E_ALL);
+ } else {
+ define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
+ }
+
require_once 'config.php';
require_once 'db-prefs.php';
@@ -130,7 +136,7 @@
error_reporting(0);
$r = fopen($icon_url, "r");
- error_reporting (E_ERROR | E_WARNING | E_PARSE);
+ error_reporting (DEFAULT_ERROR_LEVEL);
if ($r) {
$tmpfname = tempnam("/tmp", "ttrssicon");
@@ -152,7 +158,7 @@
chmod($icon_file, 0644);
- error_reporting (E_ERROR | E_WARNING | E_PARSE);
+ error_reporting (DEFAULT_ERROR_LEVEL);
}
}
@@ -167,7 +173,7 @@
error_reporting(0);
$rss = fetch_rss($feed_url);
- error_reporting (E_ERROR | E_WARNING | E_PARSE);
+ error_reporting (DEFAULT_ERROR_LEVEL);
db_query($link, "BEGIN");
@@ -352,7 +358,7 @@
if (is_filtered($entry_title, $entry_content, $entry_link, $filters)) {
continue;
}
- error_reporting (E_ERROR | E_WARNING | E_PARSE);
+ error_reporting (DEFAULT_ERROR_LEVEL);
$result = db_query($link,
"SELECT ref_id FROM ttrss_user_entries WHERE