Page 1 of 1

Strange Error

Posted: Tue Jul 27, 2010 10:05 am
by pekler
I get an error on line 63 which is in bold below in the function. Here is the error: Parse error: syntax error, unexpected T_VARIABLE in /home/sites/.........bla bla bla on line 63. Anyone know whats going on there?

Code: Select all

function staticGetMultiple($ids, $limit=9, $start=0) {

		$object = new DataObjects_Registration();
		if (is_array($ids) && count ($ids)) {
			$object->whereAdd('id IN ('.implode(',',$ids).')');
		#	$object->limit($start,$limit);
		} else {
			return array();
		}
		$object->find();

		$objects = array();
		while ($object->fetch()) {
			$tmpObject = new Registration();
			[u][b]$tmpObject->importDataObject(clone $object);[/b][/u]
			$tmpObject->setRegistration(str_replace(' ','',$tmpObject->getRegistration()));
			$objects[$tmpObject->getId()] = clone $tmpObject;
		}
		$orderedObjects = array();
		foreach ($ids as $id) {
			$orderedObjects[] = clone $objects[$id];
		}
		return $orderedObjects;

	}

Re: Strange Error

Posted: Tue Jul 27, 2010 10:09 am
by Benjamin
Perhaps your version of PHP does not support clone.