more strict fixes

This commit is contained in:
Robin Appelman 2011-04-16 22:50:21 +02:00
parent d1faeca8d4
commit 6d64a90c24
4 changed files with 39 additions and 39 deletions

View file

@ -100,7 +100,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function getValidTypes()
{
$types = $this->valid_default_values;
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -145,7 +145,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$types = is_array($types) ? $types : array($types);
foreach ($types as $key => $type) {
if (!isset($this->valid_default_values[$type])) {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -209,7 +209,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
return fopen('MDB2LOB://'.$lob_index.'@'.$this->db_index, 'r+');
}
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -235,7 +235,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
if (is_null($value)) {
return null;
}
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -338,7 +338,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function getDeclaration($type, $name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -387,7 +387,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function getTypeDeclaration($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -453,7 +453,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -501,7 +501,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$default = '';
if (array_key_exists('default', $field)) {
if ($field['default'] === '') {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -583,7 +583,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _getIntegerDeclaration($name, $field)
{
if (!empty($field['unsigned'])) {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -651,7 +651,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getCLOBDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -687,7 +687,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _getBLOBDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -875,7 +875,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
$type = !empty($current['type']) ? $current['type'] : null;
if (!method_exists($this, "_compare{$type}Definition")) {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1114,7 +1114,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function quote($value, $type = null, $quote = true, $escape_wildcards = false)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1218,7 +1218,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
return $value;
}
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1254,7 +1254,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
}
if (is_resource($value)) {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1369,7 +1369,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteDate($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_DATE') {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1398,7 +1398,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteTimestamp($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_TIMESTAMP') {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1427,7 +1427,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
function _quoteTime($value, $quote, $escape_wildcards)
{
if ($value === 'CURRENT_TIME') {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1517,7 +1517,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function writeLOBToFile($lob, $file)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1681,7 +1681,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1755,7 +1755,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function mapNativeDatatype($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1784,7 +1784,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function _mapNativeDatatype($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -1805,7 +1805,7 @@ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common
*/
function mapPrepareDatatype($type)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}

View file

@ -116,7 +116,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -219,7 +219,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -308,7 +308,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function _getDecimalDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -346,7 +346,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -531,7 +531,7 @@ class MDB2_Driver_Datatype_mysql extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}

View file

@ -117,7 +117,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -198,7 +198,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -262,7 +262,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
return $value;
}
if (version_compare(PHP_VERSION, '5.2.0RC6', '>=')) {
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -317,7 +317,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -366,7 +366,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function patternEscapeString()
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -492,7 +492,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -519,7 +519,7 @@ class MDB2_Driver_Datatype_pgsql extends MDB2_Driver_Datatype_Common
*/
function mapPrepareDatatype($type)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}

View file

@ -101,7 +101,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function getTypeDeclaration($field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -199,7 +199,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function _getIntegerDeclaration($name, $field)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -237,7 +237,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
*/
function matchPattern($pattern, $operator = null, $field = null)
{
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}
@ -388,7 +388,7 @@ class MDB2_Driver_Datatype_sqlite extends MDB2_Driver_Datatype_Common
$length = null;
break;
default:
$db =& $this->getDBInstance();
$db =$this->getDBInstance();
if (PEAR::isError($db)) {
return $db;
}