php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57281 uppercase in class names damages bytecode
Submitted: 2006-10-05 17:15 UTC Modified: 2006-12-17 06:00 UTC
From: t0nni at gmx dot net Assigned: val (profile)
Status: Closed Package: bcompiler (PECL)
PHP Version: 5.1.6 OS: Windows XP Pro SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: t0nni at gmx dot net
New email:
PHP Version: OS:

 

 [2006-10-05 17:15 UTC] t0nni at gmx dot net
Description:
------------
I use PHP5.1.6 as an Apache2.2.3 module with the bcompiler extension (version 0.8s) installed.
I get the error if there is any uppercase character in the class declaration. It does not matter if the classname is written with uppercase letters at useage or as parameter for bcompiler_write_class.

Reproduce code:
---------------
compile.php:
<?php
class fooBar {}

$h=fopen('bytecode.php', 'w');
bcompiler_write_header($h);
bcompiler_write_class($h, 'fooBar');
bcompiler_write_footer($h);
fclose($h);
?>

run.php:
<?php
include 'bytecode.php';
$instance=new fooBar();
?>

Expected result:
----------------
I expected run.php to run without an error.

Actual result:
--------------
Fatal error: Class 'fooBar' not found in run.php on line 3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-13 14:58 UTC] val@php.net
try to use bcompiler_write_file(), it's now prefered way of doing things with bcompiler. and it works fine with your example

but I will fix older bcompiler_write_class() asap...
 [2006-12-17 06:00 UTC] val@php.net
This bug has been fixed in CVS.

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.

fixed for classes written with bcompiler_write_class() on CVS in bcompiler.c revision 1.108
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 07:01:27 2024 UTC