Hi. On my site im getting this error message:

Catchable fatal error: Object of class ADORecordSet_empty could not be converted to string in /f1/content/gothichack/public/skeletonreborn/adodb/adodb.inc.php on line 839

So if i go to adodb.inc.php, line 839:

$sqlarr = explode('?',$sql);

And some code around that:

			
			if (!is_array($sql) && !$this->_bindInputArray) {
				$sqlarr = explode('?',$sql);
					

Please help, ive been searching and searching, but cant find an easy answer (or any answer at all)

    Where does $sql come from? What is it? If not entirely sure, try var_dump()-ing it:

    echo "<pre>";
    var_dump($sql);
    echo "</pre>";
    
      DreamHack497;10902393 wrote:
      			
      			if (!is_array($sql) && !$this->_bindInputArray) {
      				$sqlarr = explode('?',$sql);
      					

      This is saying that if $sql is NOT an array and whatever $this->_bindInputArray is evaluates as false, then do the explode(). But explode() requires that its 2nd parameter is an array, so it doesn't really make sense.

        1. Lol, i didnt write it, it was already in adodb.
        2. Not sure where to put that var_dump you posted.

        Anyways, heres that section of code i think sql came from.

        	/**
        	 * Execute SQL 
        	 *
        	 * @param sql		SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
        	 * @param [inputarr]	holds the input data to bind to. Null elements will be set to null.
        	 * @return 		RecordSet or false
        	 */
        	function &Execute($sql,$inputarr=false) 
        	{
        		if ($this->fnExecute) {
        			$fn = $this->fnExecute;
        			$ret =& $fn($this,$sql,$inputarr);
        			if (isset($ret)) return $ret;
        		}
        		if ($inputarr) {
        			if (!is_array($inputarr)) $inputarr = array($inputarr);
        
        		$element0 = reset($inputarr);
        		# is_object check because oci8 descriptors can be passed in
        		$array_2d = is_array($element0) && !is_object(reset($element0));
        		//remove extra memory copy of input -mikefedyk
        		unset($element0);
        
        		if (!is_array($sql) && !$this->_bindInputArray) {
        			$sqlarr = explode('?',$sql);
        
        			if (!$array_2d) $inputarr = array($inputarr);
        			foreach($inputarr as $arr) {
        				$sql = ''; $i = 0;
        				//Use each() instead of foreach to reduce memory usage -mikefedyk
        				while(list(, $v) = each($arr)) {
        					$sql .= $sqlarr[$i];
        					// from Ron Baldwin <ron.baldwin#sourceprose.com>
        					// Only quote string types	
        					$typ = gettype($v);
        					if ($typ == 'string')
        						//New memory copy of input created here -mikefedyk
        						$sql .= $this->qstr($v);
        					else if ($typ == 'double')
        						$sql .= str_replace(',','.',$v); // locales fix so 1.1 does not get converted to 1,1
        					else if ($typ == 'boolean')
        						$sql .= $v ? $this->true : $this->false;
        					else if ($typ == 'object') {
        						if (method_exists($v, '__toString')) $sql .= $this->qstr($v->__toString());
        						else $sql .= $this->qstr((string) $v);
        					} else if ($v === null)
        						$sql .= 'NULL';
        					else
        						$sql .= $v;
        					$i += 1;
        				}
        				if (isset($sqlarr[$i])) {
        					$sql .= $sqlarr[$i];
        					if ($i+1 != sizeof($sqlarr)) ADOConnection::outp( "Input Array does not match ?: ".htmlspecialchars($sql));
        				} else if ($i != sizeof($sqlarr))	
        					ADOConnection::outp( "Input array does not match ?: ".htmlspecialchars($sql));
        
        				$ret =& $this->_Execute($sql);
        				if (!$ret) return $ret;
        			}	
        		} else {
        			if ($array_2d) {
        				if (is_string($sql))
        					$stmt = $this->Prepare($sql);
        				else
        					$stmt = $sql;
        
        				foreach($inputarr as $arr) {
        					$ret =& $this->_Execute($stmt,$arr);
        					if (!$ret) return $ret;
        				}
        			} else {
        				$ret =& $this->_Execute($sql,$inputarr);
        			}
        		}
        	} else {
        		$ret =& $this->_Execute($sql,false);
        	}
        
        	return $ret;
        }
          Write a Reply...