New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP::Include did not handle comments #7139
Comments
From ajs@ajs.comCreated by ajs@ajs.comPHP::Include did not handle comments or arrays with Inline Patch--- PHP-Include-0.07.orig/lib/PHP/Include/Vars.pm 2003-11-14 17:39:20.000000000 -0500
+++ PHP-Include-0.07/lib/PHP/Include/Vars.pm 2004-02-27 16:20:20.000000000 -0500
@@ -5,13 +5,21 @@
use Parse::RecDescent;
use Data::Dumper;
+ $::RD_HINT = 1;
+ $::RD_TRACE = undef;
+ $::RD_WARN = 1;
+ $::RD_ERRORS = 1;
+
+
our $perl = '';
my $grammar =
<<'GRAMMAR';
-php_vars: php_start assignment(s) php_end
+php_vars: php_start statement(s) php_end
+
+statement: /\#.*/ | assignment
php_start: /\s*<\?php\s*/
@@ -27,13 +35,13 @@
$return = "my $item[1]=$item[3]";
}
-hash_assign: variable /=/ /Array\s*\(/ pair(s /,/) /\s*\)/
+hash_assign: variable /=/ /Array\s*\(/i pair(s /,/) /\s*(,\s*)?\)/
{
$item[1] =~ s/^\$/%/;
$return = "my $item[1]=(" . join( ',', @{$item[4]} ) . ')';
}
-array_assign: variable /=/ /Array\s*\(/ element(s /,/) /\s*\)/
+array_assign: variable /=/ /Array\s*\(/i element(s /,/) /\s*\)/
{
$item[1] =~ s/^\$/@/;
$return = "my $item[1]=(" . join( ',', @{$item[4]} ) . ')' Perl Info
|
From @rspierThis bug should be reported to bug-php-include@rt.cpan.org |
The RT System itself - Status changed from 'new' to 'open' |
@rspier - Status changed from 'open' to 'resolved' |
From @schwernOn Fri, Feb 27, 2004 at 09:34:50PM -0000, Aaron Sherman wrote:
This patch should go to the author of PHP::Include, Ed Summers. -- |
Migrated from rt.perl.org#27187 (status was 'resolved')
Searchable as RT27187$
The text was updated successfully, but these errors were encountered: