Project

General

Profile

Bug #4781

Warning in reporting tab - invalid argument in foreach

Added by Yannick Warnier over 7 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
-
Target version:
Start date:
21/05/2012
Due date:
% Done:

80%

Estimated time:
0.50 h
Spent time:
Complexity:
Easy
SCRUM pts - complexity:
3

Description

Warning: Invalid argument supplied for foreach() in /var/www/chamilodev.beeznest.com/www/main/inc/lib/course.lib.php on line 715 Call Stack: 0.0030 1144920 1. {main}() /var/www/chamilodev.beeznest.com/www/main/mySpace/index.php:0 1.0607 53571456 2. CourseManager::get_user_list_from_courses_as_coach() /var/www/chamilodev.beeznest.com/www/main/mySpace/index.php:185 1.0608 53571928 3. CourseManager::get_course_list_as_coach() /var/www/chamilodev.beeznest.com/www/main/inc/lib/course.lib.php:727

Seen on http://chamilodev.beeznest.com, as admin.

Usually this can be fixed by putting a check around the foreach:

if (is_array($table)) {
  foreach ($table as $item) {
    ...
  }
}

Files

course.lib.php (172 KB) course.lib.php Yoselyn Castillo, 21/05/2012 14:59

History

#1

Updated by Yoselyn Castillo over 7 years ago

ya agregue el checked antes del foreach, pero tengo problemas con el mercurial, por favor sube tu este fichero para poder probar si se elimino el error.

#2

Updated by Julio Montoya over 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Yoselyn Castillo
#3

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Bug resolved

Corregido, gracias

Also available in: Atom PDF