Re: [PATCH] XML_DTD : DTD/XmlValidator.php

From: Date: Fri, 02 Apr 2004 21:39:36 +0000
Subject: Re: [PATCH] XML_DTD : DTD/XmlValidator.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26975@lists.php.net to get a copy of this message
Guillaume Lecanu wrote:
Hi, Just a patch for fix a little bug : The method _errors() need 2 parameters (without default value), but on the lines 72 and 213, the second argument have only the first parameter. ------------------------------------------------------------------------ ? XmlValidator.diff Index: XmlValidator.php =================================================================== RCS file: /repository/pear/XML_DTD/DTD/XmlValidator.php,v retrieving revision 1.3 diff -u -r1.3 XmlValidator.php --- XmlValidator.php 22 Sep 2003 17:42:04 -0000 1.3 +++ XmlValidator.php 2 Apr 2004 21:21:21 -0000 @@ -72,7 +72,7 @@
         $xml_tree =& new XML_Tree($xml_file);
         $nodes = $xml_tree->getTreeFromFile();
         if (PEAR::isError($nodes)) {
-            $this->_errors($nodes->getMessage());
+            $this->_errors($nodes->getMessage(), 0);
             return false;
         }
         $dtd_parser =& new XML_DTD_Parser;
@@ -213,7 +213,7 @@
         // If there are still attributes those are not declared in DTD
         if (count($node_atts) > 0) {
             $this->_errors("The attributes: '" . implode(', ', array_keys($node_atts)) .
-                           "' are not declared in DTD for tag <$name>");
+                           "' are not declared in DTD for tag <$name>", $lineno);
         }
     }
please paste patches into a bug report! pear.php.net/bugs otherwise they may get lost regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#26975) next »