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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Paul dot Hampson at Pobox dot Com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 23:01:29 2025 UTC