Skip to content
This repository

Problem in checking large files #94

Closed
miau opened this Issue June 19, 2012 · 3 comments

2 participants

Koji Ando Manuel Pichler
Koji Ando
miau commented June 19, 2012

Sometimes checking of a large file with PHPMD fails with a variety of errors.
(It seems depend on the path of the file, xdebug setting, and so on.)

Here are some examples.

(1) tcpdf.php in http://sourceforge.net/projects/tcpdf/files/ (29,300 lines)

(case 1)
>phpmd tcpdf/tcpdf.php xml unusedcode
Fatal error: Call to undefined method PHP_Depend_Code_ASTVariableDeclarator::isValueAvailable() in
C:\xampp\php\PEAR\PHP\Depend\Code\Parameter.php on line 350

(case 2)
>phpmd tcpdf/tcpdf.php xml unusedcode
Fatal error: Cannot access protected property PHP_Depend_Code_Method::$parent in
C:\xampp\php\PEAR\PHP\Depend\Code\ASTNode.php on line 554

(2) DB/DataObject.php in http://pear.php.net/package/DB_DataObject/download (4,729 lines)

>phpmd DB/DataObject.php xml unusedcode
Fatal error: Call to a member function isInstanceOf() on a non-object in C:\xampp\php\PEAR\PHP\PMD\Rule\UnusedPrivateField.php on line 200

Though I executed phpmd, cache files in ~/.pdepend seems to be corrupted and
it seems to be the problem of PHP Depend.

I hope that someone can reproduce the problem.

Koji Ando
miau commented June 20, 2012

It turns out that the problem is not due to PHP Depend, but due to serialize() function. I'll post the details later.

Koji Ando
miau commented June 20, 2012

I reported the problem to bugs.php.net.

If the bug won't be fixed, it would be helpful if you could take measures to avoid the problem.

Manuel Pichler
Owner

Strange, there was already a similar bug in PHP that I have found with PHP_Depend

Manuel Pichler manuelpichler closed this issue from a commit November 08, 2013
Manuel Pichler Close #94 and disables the file cache on affected PHP version
with this fix we provide a workaround for issue 94 which is caused by a
bug in PHP's unserialize/serialize implementation in all PHP versions
5.4.0 and 5.4.4. With this workaround we deactivate the file cache in
all affected PHP versions.
b94cb21
Manuel Pichler manuelpichler closed this in b94cb21 November 08, 2013
Manuel Pichler manuelpichler referenced this issue from a commit November 08, 2013
Manuel Pichler Close #94 and disables the file cache on affected PHP version
with this fix we provide a workaround for issue 94 which is caused by a
bug in PHP's unserialize/serialize implementation in all PHP versions
5.4.0 and 5.4.4. With this workaround we deactivate the file cache in
all affected PHP versions.
5bbd201
Manuel Pichler manuelpichler referenced this issue from a commit November 08, 2013
Manuel Pichler Close #94 and disables the file cache on affected PHP version
with this fix we provide a workaround for issue 94 which is caused by a
bug in PHP's unserialize/serialize implementation in all PHP versions
5.4.0 and 5.4.4. With this workaround we deactivate the file cache in
all affected PHP versions.
4d68629
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.