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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC