Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, i use the function to intercept PEAR::setErrorHandling around appearing mistakes and to evaluate. This leads by the using XML_Serilaizer to problems. If i give the Serilaizer a multi one dimensional array hand over my program is broken off by a an "error" while testing, within the class XML_Serilaizer, with the function XML_Util::isValidName. Would it be better to produce on these places no error object? Is this a problem on mine or on the side of the class? Kind Regards Georg
Post Follow-up to this messageGeorg Bez wrote:
> Hi,
> i use the function to intercept PEAR::setErrorHandling around
> appearing mistakes and to evaluate.
> This leads by the using XML_Serilaizer to problems.
>
> If i give the Serilaizer a multi one dimensional array hand
> over my program is broken off by a an "error" while testing,
> within the class XML_Serilaizer, with the function
> XML_Util::isValidName.
>
> Would it be better to produce on these places no error object?
> Is this a problem on mine or on the side of the class?
I have already send stefan a patch for this.
Essentially what is missing are expectError()/popExpect() calls around
the method call.
RCS file: /repository/pear/XML_Serializer/Serializer.php,v
retrieving revision 1.26
diff -u -r1.26 Serializer.php
--- Serializer.php 6 Nov 2004 15:49:52 -0000 1.26
+++ Serializer.php 25 Nov 2004 13:19:20 -0000
@@ -430,7 +430,9 @@
// copy key
$origKey = $key;
// key cannot be used as tagname => use default tag
+ $this->expectError(array(.. lots of error codes that
XML_Util::isValidName may throw));
$valid = XML_Util::isValidName($key);
+ $this->popExpect();
if (PEAR::isError($valid)) {
if ($this->options['classAsTagName'] &&
is_object($value)) {
$key = get_class($value);
regards,
Lukas
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.