svn: /web/doc-editor/trunk/php/ ToolsError.php
| From: | Yannick Torres | Date: | Wed, 03 Aug 2011 06:03:05 +0000 |
| Subject: | svn: /web/doc-editor/trunk/php/ ToolsError.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2157@lists.php.net to get a copy of this message | ||
yannick Wed, 03 Aug 2011 06:03:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314130
Log:
Fix SgmlDefaultDTDFile error check
Changed paths:
U web/doc-editor/trunk/php/ToolsError.php
Modified: web/doc-editor/trunk/php/ToolsError.php
===================================================================
--- web/doc-editor/trunk/php/ToolsError.php 2011-08-03 05:50:13 UTC (rev 314129)
+++ web/doc-editor/trunk/php/ToolsError.php 2011-08-03 06:03:05 UTC (rev 314130)
@@ -11,21 +11,34 @@
{
/**
- * EN content of the file.
+ * EN content of the file without any comment.
*
* @var string
*/
private $en_content;
/**
- * LANG content of the file.
+ * EN content of the file with comments.
*
* @var string
*/
+ private $en_content_with_comment;
+
+ /**
+ * LANG content of the file without any comment.
+ *
+ * @var string
+ */
private $lang_content;
+ /**
+ * LANG content of the file with comments.
+ *
+ * @var string
+ */
+ private $lang_content_with_comment;
/**
- * LANG of the checked file .
+ * LANG of the checked file.
*
* @var string
*/
@@ -82,6 +95,8 @@
*/
function setParams($en_content, $lang_content, $lang, $filePath, $fileName, $maintainer)
{
+ $this->lang_content_with_comment = $lang_content;
+ $this->en_content_with_comment = $en_content;
$this->lang_content = preg_replace('/<!--(.*?)?-->/s', '',
$lang_content);
$this->en_content = preg_replace('/<!--(.*?)?-->/s', '',
$en_content);
@@ -402,15 +417,15 @@
function SgmlDefaultDTDFile($lang)
{
if( $lang == 'en' ) {
- $content = $this->en_content;
+ $content = $this->en_content_with_comment;
} else {
- $content = $this->lang_content;
+ $content = $this->lang_content_with_comment;
}
$matches = array();
preg_match_all('@sgml-default-dtd-file:"(.*)"@', $content, $matches);
- if ( !empty($matches) && $matches[1][0] != '~/.phpdoc/manual.ced')
+ if ( !empty($matches) && isset($matches[1][0]) && $matches[1][0] !=
'~/.phpdoc/manual.ced')
{
$this->addError(array(
'value_en' => 'N/A',