From f317909a84febe6ef0b183b1b0dbb58845cbf426 Mon Sep 17 00:00:00 2001 From: rurban Date: Sat, 13 Jan 2007 23:34:49 +0000 Subject: [PATCH] More php-5.2.0 fixes __toString git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@5507 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/XmlElement.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/XmlElement.php b/lib/XmlElement.php index 8e2c8fc1d..aabca5842 100644 --- a/lib/XmlElement.php +++ b/lib/XmlElement.php @@ -1,4 +1,4 @@ -_xml; } + /* php-5.2 magic */ + function __toString () { + return $this->_xml; + } + function asXML () { return $this->_xml; } @@ -496,6 +501,11 @@ class FormattedText { $args[] = AsString($arg); return call_user_func_array('sprintf', $args); } + + /* php-5.2 magic */ + function __toString () { + return $this->asString(); + } } /** @@ -615,6 +625,9 @@ function fmt ($fs /* , ... */) { } // $Log: not supported by cvs2svn $ +// Revision 1.40 2007/01/13 23:28:56 rurban +// php-5.2.0 fix for string fallback: Provide the magic method __toString +// // Revision 1.39 2006/08/15 13:36:23 rurban // support iso-8859-2 // -- 2.45.0