fix for bug #3120 - PHP Fatal error by saving email as Infolog and Access to undeclared static property: sqlfs_utils::$pdo

This commit is contained in:
Ralf Becker 2012-03-07 13:04:46 +00:00
parent 116f12aa8b
commit 434a612d57

View File

@ -148,7 +148,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
*
* @var PDO
*/
static private $pdo;
static protected $pdo;
/**
* Array with filenames of dir opened with dir_opendir
*
@ -1595,6 +1595,21 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
return $time;
}
/**
* Just a little abstration 'til I know how to organise stuff like that with PDO
*
* @param boolean $val
* @return string '1' or '0' for mysql, 'true' or 'false' for everyone else
*/
static protected function _pdo_boolean($val)
{
if (self::$pdo_type == 'mysql')
{
return $val ? '1' : '0';
}
return $val ? 'true' : 'false';
}
/**
* Maximum value for a single hash element (should be 10^N): 10, 100 (default), 1000, ...
*