Login   Register  
PHP Classes
elePHPant
Icontem

Find Bug

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Transparent PHP AOP  >  All threads  >  Find Bug  >  (Un) Subscribe thread alerts  
Subject:Find Bug
Summary:Find bug during process utf-8 format source file
Messages:4
Author:elf.cheng
Date:2007-07-03 11:53:02
Update:2007-07-05 22:12:16
 

  1. Find Bug   Reply  
Picture of elf.cheng
elf.cheng
2007-07-03 11:53:02
i get an error compiled code when i processed utf-8(with bom) format source file with this package.it due to the the source file not start with "<?". So,when processe utf-8(with bom) format source file ,we need
get ride of the bom(3 bytes).

  2. Re: Find Bug   Reply  
Picture of Guilherme Blanco
Guilherme Blanco
2007-07-03 21:11:59 - In reply to message 1 from elf.cheng
Could you please provide me a test sample?
The piece of PHP file and the piece of Xml Aspect Definition file?

This can be handy for me to update and solve this particular issue.

Regards,

  3. Re: Find Bug   Reply  
Picture of elf.cheng
elf.cheng
2007-07-04 15:05:19 - In reply to message 2 from Guilherme Blanco
i mail the file to you

  4. Re: Find Bug   Reply  
Picture of Guilherme Blanco
Guilherme Blanco
2007-07-05 22:12:16 - In reply to message 3 from elf.cheng
Hi Elf,

A small patch solves you issue.
You may experience some issues depending on PHP version you're currently using.

At AOP_CodeParser, line 19:

$this->code = (trim(substr($sCode, 0, 2)) == "<?") ? $sCode : "<?php " . $sCode . " ?>";


Switch to:

$this->code = $sCode;


I remember that some PHP versions has a restriction with token_get_all, that it must start with the PHP open tag. Please check it this patch solves your issue and report me.