Bug #13217: Removal of unneeded code from execution flow.
| From: | Paul dot Hampson at Pobox dot Com | Date: | Sun, 09 Sep 2001 02:37:15 +0000 |
| Subject: | Bug #13217: Removal of unneeded code from execution flow. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-65516@lists.php.net to get a copy of this message | ||
From: Paul.Hampson@Pobox.Com
Operating system: Debian GNU/Linux
PHP version: 4.0.6
PHP Bug Type: Feature/Change Request
Bug description: Removal of unneeded code from execution flow.
If (z_value && ZZ_STRLEN_PP(z_value) == 0) then encoded_value isn't used.
So no need to generate it, surely?
This patch'll be mangled by the wrapping in the window, so it's available
at <a
href="http://www.bubblesworth.com/php4.cvs2.diff">http://www.bubblesworth.com/php4.cvs2.diff</a>
--- ext/standard/head.c.cvs Sun Sep 9 12:13:27 2001
+++ ext/standard/head.c.new Sun Sep 9 12:39:47 2001
@@ -118,7 +118,7 @@
if (z_name) {
len += Z_STRLEN_PP(z_name);
}
- if (z_value) {
+ if (z_value && Z_STRLEN_PP(z_value) != 0) {
int encoded_value_len;
encoded_value = php_url_encode(Z_STRVAL_PP(z_value),
Z_STRLEN_PP(z_value), &encoded_value_len);
--
Edit bug report at: http://bugs.php.net/?id=13217&edit=1