Revision: 3570
http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3570&view=rev
Author: mpwalsh8
Date: 2013-02-26 14:41:37 +0000 (Tue, 26 Feb 2013)
Log Message:
-----------
Fixed issue with method_exists() and PHP 5.3.x compatibility.
Modified Paths:
--------------
branches/BRANCH_2_X/phphtmllib/ContainerClass.inc
Modified: branches/BRANCH_2_X/phphtmllib/ContainerClass.inc
===================================================================
--- branches/BRANCH_2_X/phphtmllib/ContainerClass.inc 2012-09-03 13:49:35 UTC (rev 3569)
+++ branches/BRANCH_2_X/phphtmllib/ContainerClass.inc 2013-02-26 14:41:37 UTC (rev 3570)
@@ -112,11 +112,12 @@
* @return string the raw html output.
*/
function render($indent_level=0, $output_debug=0) {
+
$html = '';
for ($x=0; $x<=$this->_data_count-1; $x++) {
$item = &$this->_content[$x];
- if (method_exists($item, "render") ) {
+ if (is_object($item) && method_exists($item, "render") ) {
if (($this->_flags & _COLLAPSE) && method_exists($item, "set_collapse")) {
$item->set_collapse(TRUE, FALSE);
}
@@ -133,6 +134,7 @@
}
}
}
+
if ($this->_flags & _COLLAPSE) {
$indent = $this->_render_indent($indent_level, $output_debug);
if ($this->_flags & _NEWLINEAFTERCONTENT) {
@@ -146,6 +148,7 @@
}
}
+
return $html;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|