]> granicus.if.org Git - php/commitdiff
Only show req attribute if given
authorBob Weinand <bobwei9@hotmail.com>
Thu, 9 Oct 2014 12:54:47 +0000 (14:54 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Thu, 9 Oct 2014 12:54:47 +0000 (14:54 +0200)
phpdbg_utils.c

index c2137020faa44a16380ae2133ce79abec5abdb9a..6c65ebe10b480a9eeb948c5eb7ec2009ead2fa9e 100644 (file)
@@ -780,8 +780,13 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca
 
 
                                case 'r':
-                                       s_len = spprintf(&s, 0, "req=\"%lu\"", PHPDBG_G(req_id));
-                                       free_s = s;
+                                       if (PHPDBG_G(req_id)) {
+                                               s_len = spprintf(&s, 0, "req=\"%lu\"", PHPDBG_G(req_id));
+                                               free_s = s;
+                                       } else {
+                                               s = "";
+                                               s_len = 0;
+                                       }
                                        break;