php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #13217 Removal of unneeded code from execution flow.
Submitted: 2001-09-08 22:37 UTC Modified: 2002-04-27 16:06 UTC
From: Paul dot Hampson at Pobox dot Com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: Debian GNU/Linux
Private report: No CVE-ID: None
 [2001-09-08 22:37 UTC] Paul dot Hampson at Pobox dot Com
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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-08 22:39 UTC] Paul dot Hampson at Pobox dot Com
Grr web interface:
http://www.bubblesworth.com/php4.cvs2.diff
 [2002-04-27 16:06 UTC] jimw@php.net
this bit of code has been rewritten.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 23:01:30 2024 UTC