Ok, I reported the bug to PEAR too since the error is also on SVN trunk :-)
The problem is that there's a parentheses mistake on line 232. In the patch included in this mail is both fixes, the parenthesis one and the raiseErro one. Thanks. Ernesto On Tue, Mar 22, 2011 at 18:16, Ondřej Surý <ond...@debian.org> wrote: > You could try to pull whole PEAR 1.9.3 from SVN and test if it works. > > And I guess PEAR people would be happy if you report new bugs along > the way. (Something could be caused by pulling incomplete fix from > 1.9.3 to fix new CVE caused by another incomplete fix for different > CVE... argh, so we have incomplete fixes on top of incomplete fixes > :))). > > Thanks for debugging the issue, it's much appreciated. > > O. > > On Tue, Mar 22, 2011 at 22:06, Ernesto Domato <edo...@gmail.com> wrote: >> Ok, that solves part of the problem but there's more upstream ones :-P >> >> The saveCache function calls System::mkdir but the method is >> System::mkDir and for that reason, now the error is raised correctly >> but is because is calling a method from System module that doesn't >> exists. >> >> Anyway, changing line 232 from REST.php to call System::mkDir still >> doesn't solve the problem (even when the correct method is called). >> >> I'm still debugging the problem that is really weird cause making a >> simple test script that makes the same call to System::mkDir that >> REST.php does creates the directory as it should but the on the >> REST.php is not created and the error is raised. >> >> I'll let you know when I finally got it. >> >> Ernesto >> >> On Tue, Mar 22, 2011 at 17:43, Ondřej Surý <ond...@debian.org> wrote: >>> tags 619307 +upstream patch >>> thank you >>> >>> Looks like an upstream bug, diff is here (and attached): >>> >>> http://svn.php.net/viewvc/pear/pear-core/trunk/PEAR/REST.php?r1=308688&r2=308983 >>> >>> Apply the attached patch for a quick fix. >>> >>> I'll pull the fix to -4 tomorrow. >>> >>> Thanks for the report, >>> >>> O. >>> >> > > > > -- > Ondřej Surý <ond...@sury.org> > http://blog.rfc1925.org/ >
--- REST.php.old 2011-03-18 16:33:00.000000000 -0300 +++ REST.php.new 2011-03-22 18:46:25.000000000 -0300 @@ -102,7 +102,7 @@ // reset the age of the cache if the server says it was unmodified $result = $this->saveCache($url, $ret, null, true, $cacheId); if (PEAR::isError($result)) { - return PEAR::raiseErro($result->getMessage()); + return PEAR::raiseError($result->getMessage()); } } @@ -122,7 +122,7 @@ if ($forcestring) { $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); if (PEAR::isError($result)) { - return PEAR::raiseErro($result->getMessage()); + return PEAR::raiseError($result->getMessage()); } return $content; @@ -162,7 +162,7 @@ $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); if (PEAR::isError($result)) { - return PEAR::raiseErro($result->getMessage()); + return PEAR::raiseError($result->getMessage()); } return $content; @@ -229,7 +229,7 @@ $cachefile = $d . 'rest.cachefile'; if (!is_dir($cache_dir)) { - if (System::mkdir(array('-p', $cache_dir) === false)) { + if (System::mkdir(array('-p', $cache_dir)) === false) { return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory and attempts to create the directory failed."); } } @@ -480,4 +480,4 @@ return $data; } -} \ No hay ningún carácter de nueva línea al final del fichero +}