svn: /pear/pearweb/trunk/cron/ find-documentation.php

From: Date: Thu, 09 Sep 2010 07:56:13 +0000
Subject: svn: /pear/pearweb/trunk/cron/ find-documentation.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9652@lists.php.net to get a copy of this message
clockwerx Thu, 09 Sep 2010 07:56:13 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303207 Log: Render to stdout when the regex fails Changed paths: U pear/pearweb/trunk/cron/find-documentation.php Modified: pear/pearweb/trunk/cron/find-documentation.php =================================================================== --- pear/pearweb/trunk/cron/find-documentation.php 2010-09-09 07:53:57 UTC (rev 303206) +++ pear/pearweb/trunk/cron/find-documentation.php 2010-09-09 07:56:13 UTC (rev 303207) @@ -92,6 +92,11 @@ preg_match("/<title>\s*(\w+)\s*<\/title>/s", $content, $matches1); preg_match("/<book.*?xml:id\=\"(.*?)\"\s*>/s", $content, $matches2); + if (empty($matches2)) { + print "Unable to match /<book.*?xml:id\=\"(.*?)\"\s*>/s for " . $path . ", skipping"; + continue; + } + $url = '/manual/en/' . $matches2[1] . '.php'; $request = new HTTP_Request2($host . $url);

« previous php.pear.core (#9652) next »