Menu

#43 XML entities are not resolved

V3.5
open
Engine (48)
5
2005-01-17
2005-01-10
Anonymous
No

PHP 5.0.2 as CGI

its a php5 issue.

The branch in line 5100 is taken because of php5.
Undeclared entity warning is thrown.

Patched whole method body with:
return ($reverse ? str_replace('&', '&', $xmlSource) :
str_replace('&', '&', $xmlSource));

And didn't differentiate between php versions.

Discussion

  • Nigel Swinson

    Nigel Swinson - 2005-01-17
    • labels: --> Engine
    • assigned_to: nobody --> nigelswinson
     
  • Nigel Swinson

    Nigel Swinson - 2005-01-17

    Logged In: YES
    user_id=270120

    So are you saying we can remove the hack? And that the
    method in it's entirity can now read:

    function _translateAmpersand($xmlSource,
    $reverse=FALSE) {
    return ($reverse ? str_replace('&', '&', $xmlSource) :
    str_replace('&', '&', $xmlSource));
    }

    ?

    Thanks.

    Nigel

     
  • Nobody/Anonymous

    Logged In: NO

    Yes, you can now remove the hack. I tested in with PHP
    5.0.3 and it works perfectly when the hack is removed.

     

Log in to post a comment.