Changeset 3057

Show
Ignore:
Timestamp:
11/13/05 02:54:49 (3 years ago)
Author:
matt
Message:

Add error function back, fixes #1446

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/rss-functions.php

    r2816 r3057  
    357357    } 
    358358 
    359 function map_attrs($k, $v) { 
    360     return "$k=\"$v\""; 
    361     } 
     359    function map_attrs($k, $v) { 
     360        return "$k=\"$v\""; 
     361    } 
     362 
     363    function error( $errormsg, $lvl = E_USER_WARNING ) { 
     364        // append PHP's error message if track_errors enabled 
     365        if ( isset($php_errormsg) ) { 
     366            $errormsg .= " ($php_errormsg)"; 
     367        } 
     368        if ( MAGPIE_DEBUG ) { 
     369            trigger_error( $errormsg, $lvl); 
     370        } else { 
     371            error_log( $errormsg, 0); 
     372        } 
     373    } 
     374 
    362375} 
    363376require_once( dirname(__FILE__) . '/class-snoopy.php');