From 14326fb55d0d719890c1efb57087ce93277b3750 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sun, 13 Nov 2005 02:54:49 +0000 Subject: [PATCH] Add error function back, fixes #1446 git-svn-id: https://develop.svn.wordpress.org/trunk@3057 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/rss-functions.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/wp-includes/rss-functions.php b/wp-includes/rss-functions.php index 07ccc408b5..e01fba1144 100644 --- a/wp-includes/rss-functions.php +++ b/wp-includes/rss-functions.php @@ -356,9 +356,22 @@ class MagpieRSS { } } -function map_attrs($k, $v) { - return "$k=\"$v\""; + function map_attrs($k, $v) { + return "$k=\"$v\""; } + + function error( $errormsg, $lvl = E_USER_WARNING ) { + // append PHP's error message if track_errors enabled + if ( isset($php_errormsg) ) { + $errormsg .= " ($php_errormsg)"; + } + if ( MAGPIE_DEBUG ) { + trigger_error( $errormsg, $lvl); + } else { + error_log( $errormsg, 0); + } + } + } require_once( dirname(__FILE__) . '/class-snoopy.php');