php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22790 Parameter set in function definition fails
Submitted: 2003-03-19 14:12 UTC Modified: 2003-03-24 04:21 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jasonzig at mac dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.0 OS: MacOSX 10.2.4 & Redhat Linux
Private report: No CVE-ID: None
 [2003-03-19 14:12 UTC] jasonzig at mac dot com
FUNCTION PageMover ($command, $currentSurveyTemplateID, $surveyTrackcer, $debug='BOO') {
    echo "<hr>BEGIN FUNCTION PageMover()<br>" ;
    echo "debug = " . $debug . "<br>";
    echo "END FUNCTION PageMover()<hr>" ;
}

Calling this function without overwriting the $debug parameter will result in this output:

BEGIN FUNCTION PageMover()
debug = 
END FUNCTION PageMover()

In my previous version of PHP (4.2.3), this resulted in setting "debug" to "BOO".

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-19 14:32 UTC] jasonzig at mac dot com
This seems to be a problem only when the function parameter is named "debug". This definitely was not a problem in previous versions of PHP.
 [2003-03-19 15:40 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I can not reproduce this with PHP 4.3.2-RC, using this script:

<?php

function pagemover($foobar, $debug='BOO') {
    echo "debug = " . $debug . "\n";
}
pagemover('foo');

?>

 [2003-03-24 04:21 UTC] sniper@php.net
No feedback, and apparently fixed in CVS already.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 17:01:33 2025 UTC