Permalink
Browse files

fix bugs

Fix bug the function of class can be checked.
Fix bug the file encrypt with zend optimizer.All of after it was the
same errors informations.There is none function can clear the message
returned by error_get_last().
  • Loading branch information...
cfc4n committed Sep 12, 2013
1 parent 55e7347 commit ec557d1197b2cdd54bebf9c9151bf339148d493b
Showing with 8 additions and 4 deletions.
  1. +5 −1 Pecker/Lexer.php
  2. +3 −3 Pecker/Scanner.php
@@ -15,7 +15,7 @@
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author CFC4N <cfc4n@cnxct.com>
* @package Lexer
* @version $Id: Lexer.php 1 2013-09-12 03:45:27Z cfc4n $
* @version $Id: Lexer.php 4 2013-09-12 10:49:36Z cfc4n $
*/
class Pecker_Lexer
@@ -44,6 +44,10 @@ public function __construct() {
*/
public function startLexing($code)
{
if (preg_match('/<\?(php)?\s*@Zend;[\r\n|\n]+\d+;/', $code)) {
$this->errMsg = 'Encrypt with Zend optimizer.';
return false;
}
$this->tokens = token_get_all($code);
$this->code = $code;
$this->pos = -1;
@@ -13,7 +13,7 @@
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author CFC4N <cfc4n@cnxct.com>
* @package Scanner
* @version $Id: Scanner.php 1 2013-09-12 03:45:27Z cfc4n $
* @version $Id: Scanner.php 3 2013-09-12 10:36:47Z cfc4n $
*/
class Pecker_Scanner
{
@@ -168,12 +168,12 @@ private function checkTokens(array $tokens)
}
break;
case T_VARIABLE:
$ntoken = $this->parser->getNextToken($k);
/* $ntoken = $this->parser->getNextToken($k);
if ($ntoken === '(')
{
$this->report->catchLog($token[1], $token[2]);
}
break;
break; */
case T_STRING:
if (isset($this->function[$token[1]]))
{

0 comments on commit ec557d1

Please sign in to comment.