cvs: pear /MDB2_Schema/MDB2/Schema Parser2.php

From: Date: Mon, 20 Aug 2007 05:26:19 +0000
Subject: cvs: pear /MDB2_Schema/MDB2/Schema Parser2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-48472@lists.php.net to get a copy of this message
ifeghali Mon Aug 20 05:26:19 2007 UTC Modified files: /pear/MDB2_Schema/MDB2/Schema Parser2.php Log: - implemented a simple raiseError() http://cvs.php.net/viewvc.cgi/pear/MDB2_Schema/MDB2/Schema/Parser2.php?r1=1.7&r2=1.8&diff_format=u Index: pear/MDB2_Schema/MDB2/Schema/Parser2.php diff -u pear/MDB2_Schema/MDB2/Schema/Parser2.php:1.7 pear/MDB2_Schema/MDB2/Schema/Parser2.php:1.8 --- pear/MDB2_Schema/MDB2/Schema/Parser2.php:1.7 Mon Aug 20 03:15:41 2007 +++ pear/MDB2_Schema/MDB2/Schema/Parser2.php Mon Aug 20 05:26:19 2007 @@ -42,7 +42,7 @@ // | Author: Igor Feghali <ifeghali@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Parser2.php,v 1.7 2007/08/20 03:15:41 ifeghali Exp $ +// $Id: Parser2.php,v 1.8 2007/08/20 05:26:19 ifeghali Exp $ // require_once 'XML/Unserializer.php'; @@ -572,30 +572,10 @@ return MDB2_OK; } - /* blindly copied from original parser. to be implemented yet. */ - function &raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE) + function &raiseError($msg = null, $ecode = MDB2_SCHEMA_ERROR_PARSE) { if (is_null($this->error)) { - $error = ''; - if (is_resource($msg)) { - $error.= 'Parser error: '.xml_error_string(xml_get_error_code($msg)); - $xp = $msg; - } else { - $error.= 'Parser error: '.$msg; - if (!is_resource($xp)) { - $xp = $this->parser; - } - } - if ($error_string = xml_error_string($xmlecode)) { - $error.= ' - '.$error_string; - } - if (is_resource($xp)) { - $byte = @xml_get_current_byte_index($xp); - $line = @xml_get_current_line_number($xp); - $column = @xml_get_current_column_number($xp); - $error.= " - Byte: $byte; Line: $line; Col: $column"; - } - $error.= "\n"; + $error = 'Parser error: '.$msg."\n"; $this->error =& MDB2_Schema::raiseError($ecode, null, null, $error); } return $this->error;

« previous php.pear.cvs (#48472) next »