PEAK XOOPS - Re: Fatall warning =( in englishin japanese

Re: Fatall warning =(

List posts in the topic

question Re: Fatall warning =(

msg# 1.1.1
depth:
2
Previous post - Next post | Parent - Children.1 .2 .3 | Posted on 2006/8/30 6:28
GIJOE  Ǥ   Posts: 4110
It looks an original bug of xoopsform.

In class/xoopsform/form.php

$this->_elements can be a string instead of object.

refer method addElements() and XoopsThemeForm::insertBreak().

Thus, it must be ...
	function &getElements($recurse = false){
		if (!$recurse) {
			return $this->_elements;
		} else {
			$ret = array();
			$count = count($this->_elements);
			for ($i = 0; $i < $count; $i++) {
				if ( ! is_object( $this->_elements[$i] ) ) {
					$ret[] = $this->_elements[$i];
				} else if (!$this->_elements[$i]->isContainer()) {
					$ret[] =& $this->_elements[$i];
				} else {
					$elements =& $this->_elements[$i]->getElements(true);
					$count2 = count($elements);
					for ($j = 0; $j < $count2; $j++) {
						$ret[] =& $elements[$j];
					}
					unset($elements);
				}
			}
			return $ret;
		}
	}

This report should be sent to skalpa.
(modified from is_string() to ! is_object()
Votes:38 Average:8.42

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!