From 4a448100a65bac8d8fd4b1816227e5de5290f50d Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 1 Apr 2008 15:24:40 +0000 Subject: Fix warning about get_func_args() used as parameter to other function --- it_dbi.class | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/it_dbi.class b/it_dbi.class index e59bdc2..4c4b291 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -78,8 +78,13 @@ function it_dbi($p = array(), $query = null) if ($p['getfieldinfo']) $this->_p += $this->_get_field_info(); # Get $this->_fields and p[keyfield, autoincrement, randomid] - if (is_array($query)) # Call with all arguments except first one - call_user_func_array(array($this, "select"), array(0 => null) + func_get_args()); + if (is_array($query)) + { + # Call with all arguments except first one + $args = func_get_args(); + array_shift($args); + call_user_func_array(array($this, "select"), $args); + } elseif (isset($query)) $this->read($query); } -- cgit v1.2.3