[svn r14987] Minor - is_array validation in functions.

skala
Julio Montoya 17 years ago
parent 08842f2353
commit 4ee5d3ad80
  1. 7
      main/dropbox/dropbox_functions.inc.php
  2. 8
      main/inc/lib/pear/HTML/QuickForm.php

@ -1416,6 +1416,8 @@ function get_total_number_feedback($file_id='')
*/
function check_number_feedback($key, $array)
{
if (is_array($array))
{
if (key_exists($key,$array))
{
return $array[$key];
@ -1424,6 +1426,11 @@ function check_number_feedback($key, $array)
{
return 0;
}
}
else
{
return 0;
}
}

@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
// $Id: QuickForm.php 12272 2007-05-03 14:40:45Z elixir_julian $
// $Id: QuickForm.php 14987 2008-04-21 17:14:12Z juliomontoya $
require_once('PEAR.php');
require_once('HTML/Common.php');
@ -675,10 +675,14 @@ class HTML_QuickForm extends HTML_Common {
$this->_elements[$i + 1] =& $this->_elements[$i];
if ($this->_elementIndex[$currentName] == $i) {
$this->_elementIndex[$currentName] = $i + 1;
} else {
} else
{
if (is_array($this->_duplicateIndex[$currentName]))
{
$dupIdx = array_search($i, $this->_duplicateIndex[$currentName]);
$this->_duplicateIndex[$currentName][$dupIdx] = $i + 1;
}
}
unset($this->_elements[$i]);
}
}

Loading…
Cancel
Save