Permalink
Browse files

Fixed bug #625: xdebug_get_headers() resets header list

  • Loading branch information...
1 parent e773b09 commit 622fbf854bbf323c5ea0447d5b13f04027ef03c5 @derickr committed Dec 8, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −0 tests/bug00625.phpt
  2. +0 −1 xdebug.c
View
15 tests/bug00625.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Test for bug #625: xdebug_get_headers() resets header list
+--INI--
+xdebug.default_enable=1
+--FILE--
+<?php
+header( 'Location: bar');
+header( 'HTTP/1.0 404 Not Found' );
+var_dump( xdebug_get_headers( ) );
+?>
+--EXPECTF--
+array(1) {
+ [0] =>
+ string(13) "Location: bar"
+}
View
1 xdebug.c
@@ -1855,7 +1855,6 @@ PHP_FUNCTION(xdebug_get_headers)
string = XDEBUG_LLIST_VALP(le);
add_next_index_string(return_value, string, 1);
}
- xdebug_llist_empty(XG(headers), NULL);
}

0 comments on commit 622fbf8

Please sign in to comment.