Issues

ZF-10558: Undefined variable in Zend_Cache_Backend_Static

Description

There is undefined $path variable in Zend_Cache_Backend_Static class in method removeRecursively, line 360. There is also no verification if file exists or can it be deleted.

Comments

The undefined $path variable is located within Zend_Cache_Backend_Static::removeRecursively but this method will never be called.

But it is. You can find it in cache action helper (Zend_Controller_Action_Helper_Cache) in method removePage.

@Marc If the method is never called, should it be removed?

{quote} The undefined $path variable is located within Zend_Cache_Backend_Static::removeRecursively but this method will never be called. {quote} But the method is public.

{quote} If the method is never called, should it be removed? {quote} In case of remotion will cause break BC, same if this is protected because could have a inherit to this class.

And too the framework internally makes call to this see Zend_Controller_Action_Helper_Cache#removePage().

Greetings Ramon

@Ramon Apologies, I realize now my statement was incorrect. I was referring to removing line 353 (in Zend/Cache/Backend/Static.php r22950), as Marc commented that it currently has no effect. However, it may be best to determine the original purpose of this line (ie: what was $path) and fix the code so that it performs the task it was originally intended to.

Fixed in trunk r23605 merged to release branch 1.11 r23606 - thanks.