Bug #55310 [NEW]: http_build_url query join fails when arg_separator.output is not an html entity

From: Date: Thu, 28 Jul 2011 17:53:23 +0000
Subject: Bug #55310 [NEW]: http_build_url query join fails when arg_separator.output is not an html entity
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-162244@lists.php.net to get a copy of this message
From:             
Operating system: irrelevant
PHP version:      5.3.6
Package:          HTTP related
Bug Type:         Bug
Bug description:http_build_url query join fails when arg_separator.output is not an html entity

Description:
------------
When using the flag HTTP_URL_JOIN_QUERY, the function http_build_url fails
issuing a warning when there is more than one query argument to join and
the php.ini directive arg_separator.output is not in the format of an html
entity.

Test script:
---------------
<?php
ini_set('arg_separator.output','&');
$result = http_build_url(
    'http://example.com/?a=b',
    array('query' => 'c=d'),
    HTTP_URL_JOIN_QUERY
);
?>
Expected Result: http://example.com/?a=b&c=d
Actual Result: <?php echo $result; ?>


Expected result:
----------------
Expected Result: http://example.com/?a=b&c=d
Actual Result: http://example.com/?a=b&c=d

Actual result:
--------------
Expected Result: http://example.com/?a=b&c=d
Actual Result: http://example.com/?a=b

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55310&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=55310&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=55310&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=55310&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=55310&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55310&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=55310&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=55310&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=55310&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=55310&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=55310&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=55310&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=55310&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=55310&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=55310&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=55310&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55310&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=55310&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=55310&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=55310&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=55310&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=55310&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#162244) next »