php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58994 Constant function parameters fail
Submitted: 2009-12-16 13:07 UTC Modified: 2009-12-16 14:04 UTC
From: contact at NOSPAM dot swiftlytilting dot com Assigned:
Status: Closed Package: bcompiler (PECL)
PHP Version: 5_3.1RC2 OS: Windows
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: contact at NOSPAM dot swiftlytilting dot com
New email:
PHP Version: OS:

 

 [2009-12-16 13:07 UTC] contact at NOSPAM dot swiftlytilting dot com
Description:
------------
Using constants as default parameter values in function definitions causes bcompiler to crash using  bcompiler_write_file.

I'm using php 5.3.1, bcompiler 0.91

This does not occur in 0.6, not sure about 0.7 or 0.8 though

Reproduce code:
---------------
<?php
define("SOME_CONST",1);
function foo($var = SOME_CONST)
{ return;
}

foo();

?>

Expected result:
----------------
expect code to run normally

Actual result:
--------------
causes abnormal program termination (crash)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-16 14:04 UTC] val@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 09:03:34 2022 UTC