php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55289 XSLTProcessor::getParameter returns false on unset parameters
Submitted: 2011-07-26 20:13 UTC Modified: 2013-01-03 19:55 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: christian dot korff at gmail dot com Assigned: philip (profile)
Status: Closed Package: XSLT related
PHP Version: 5.3.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christian dot korff at gmail dot com
New email:
PHP Version: OS:

 

 [2011-07-26 20:13 UTC] christian dot korff at gmail dot com
Description:
------------
The PHP manual says that XSLTProcessor::getParameter returns NULL for unset paremeters. However it seems that it results in the return value (bool)false.

Test script:
---------------
$xsl = new XSLTProcessor();
var_dump($xsl->getParameter("", "foobar"));

Expected result:
----------------
NULL

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-27 06:30 UTC] laruence@php.net
-Type: Bug +Type: Documentation Problem
 [2013-01-03 19:53 UTC] philip@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&revision=328972
Log: Returns false (not null) if the param is not set, otherwise a string. Fixes PHP Bug #55289
 [2013-01-03 19:55 UTC] philip@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: philip
 [2013-01-03 19:55 UTC] philip@php.net
You're correct and this has been fixed in SVN, thank you for the bug report. 
Here's the related code in php-src:

http://lxr.php.net/xref/PHP_5_4/ext/xsl/xsltprocessor.c#819
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 22:01:30 2024 UTC