From 2268ae946830efa5dd0ea54026bb0244695822ac Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 7 Nov 2007 22:48:54 +0100 Subject: [PATCH] [svn r13641] Minor - Avoid warning for non-array sent to reset() --- main/newscorm/learnpath.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 50ecf592d3..a17ab8afa6 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -5557,7 +5557,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') } - reset($arrLP); + if(is_array($arrLP)) { reset($arrLP); } $arrHide=array(); @@ -5584,7 +5584,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') } if(empty($s_selected_position)) $position -> setSelected($s_selected_position); - reset($arrLP); + if(is_array($arrLP)) { reset($arrLP); } if($action != 'move'){ $form->addElement('text','title', get_lang('Title').' :','id="idTitle" style="background:#F8F8F8; border:1px solid #999999; font-family:Arial, Verdana, Helvetica, sans-serif; font-size:12px; padding:1px 2px; width:300px;"');