R29376 - /trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php

Author: leithoff
New Revision: 29376

URL: http://www.egroupware.org/viewvc/egroupware?rev=29376&view=rev
Log:
pdo statement->execute expects either the prepared statement with already bound parameters OR an array of the vars to be bound. It can NOT handle them MIXED

Modified:
trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php

Modified: trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php?rev=29376&r1=29375&r2=29376&view=diff

— trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php (original)
+++ trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php Thu Mar 4 13:05:42 2010
@@ -326,16 +326,24 @@
if ($this->operation == self::STORE2FS)
{
$stmt = self::$pdo->prepare(‘UPDATE ‘.self::TABLE.’ SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier,fs_modified=:fs_modified WHERE fs_id=:fs_id’);

  •   		if (!($ret = $stmt->execute($values)))
    
  •   		{
    
  •   			error_log(__METHOD__."() execute() failed! errorInfo()=".array2string(self::$pdo->errorInfo()));
    
  •   		}
      	}
      	else
      	{
      		$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier,fs_modified=:fs_modified,fs_content=:fs_content WHERE fs_id=:fs_id');
      		$this->stream_seek(0,SEEK_SET);	// rewind to the start
    
  •   		foreach($values as $name => &$value)
    
  •   		{
    
  •   			$stmt->bindParam($name,$value);
    
  •   		}
      		$stmt->bindParam('fs_content', $this->opened_stream, PDO::PARAM_LOB);
    
  •   	}
    
  •   	if (!($ret = $stmt->execute($values)))
    
  •   	{
    
  •   		error_log(__METHOD__."() execute() failed! errorInfo()=".array2string(self::$pdo->errorInfo()));
    
  •   		if (!($ret = $stmt->execute()))
    
  •   		{
    
  •   			error_log(__METHOD__."() execute() failed! errorInfo()=".array2string(self::$pdo->errorInfo()));
    
  •   		}
      	}
      }
      $ret = fclose($this->opened_stream) && $ret;
    

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs