Improved headers sent notice to include file and line.

This commit is contained in:
Mike Jolley 2014-09-17 11:40:51 +01:00
parent 09a59a5e7e
commit 1d3b7a52c1
2 changed files with 3 additions and 1 deletions

View File

@ -463,7 +463,8 @@ function wc_setcookie( $name, $value, $expire = 0, $secure = false ) {
if ( ! headers_sent() ) {
setcookie( $name, $value, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
} elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
trigger_error( "Cookie cannot be set - headers already sent", E_USER_NOTICE );
headers_sent( $file, $line );
trigger_error( "{$name} cookie cannot be set - headers already sent by {$file} on line {$line}", E_USER_NOTICE );
}
}

View File

@ -132,6 +132,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
= 2.2.4 =
* Fix - Prevent errors when adding 'zero-rated' tax on checkout.
* Tweak - Improved headers sent notice to include file and line.
= 2.2.3 - 16/09/2014 =
* Fix - Order status translation in admin and account page.