[wp-trac] Re: [WordPress Trac] #5166: use wp_die instead of
echo/exit pair
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 9 08:53:48 GMT 2007
#5166: use wp_die instead of echo/exit pair
------------------------+---------------------------------------------------
Reporter: nbachiyski | Owner: westi
Type: defect | Status: assigned
Priority: low | Milestone: 2.4
Component: General | Version: 2.3
Severity: minor | Resolution:
Keywords: has-patch |
------------------------+---------------------------------------------------
Comment (by westi):
Replying to [comment:2 ryan]:
> Maybe add a WP_Error::die_with_message() method?
Cute
It might be nice if we can come up with something nice to replace the
following:
{{{
if ( is_wp_error($result) )
{
wp_die( $result->get_error_message() );
}
}}}
It would nice if all occurrances of the above could become oneliners like:
{{{
wp_die_if_wp_error($result);
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/5166#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list