cvargas vor 15 Jahren
Ursprung
Commit
9d26b3e85e
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      main/inc/introductionSection.inc.php

+ 6 - 3
main/inc/introductionSection.inc.php

@@ -1,6 +1,5 @@
 <?php
 <?php
 /* For licensing terms, see /license.txt */
 /* For licensing terms, see /license.txt */
-
 /**
 /**
  * The INTRODUCTION MICRO MODULE is used to insert and edit
  * The INTRODUCTION MICRO MODULE is used to insert and edit
  * an introduction section on a Chamilo Module. It can be inserted on any
  * an introduction section on a Chamilo Module. It can be inserted on any
@@ -117,8 +116,12 @@ if ($intro_editAllowed) {
 
 
 $sql = "SELECT intro_text FROM $TBL_INTRODUCTION WHERE id='".Database::escape_string($moduleId)."' AND session_id='".intval($session_id)."'";
 $sql = "SELECT intro_text FROM $TBL_INTRODUCTION WHERE id='".Database::escape_string($moduleId)."' AND session_id='".intval($session_id)."'";
 $intro_dbQuery = Database::query($sql);
 $intro_dbQuery = Database::query($sql);
-$intro_dbResult = Database::fetch_array($intro_dbQuery);
-$intro_content = $intro_dbResult['intro_text'];
+if (Database::num_rows($intro_dbQuery) > 0) {
+	$intro_dbResult = Database::fetch_array($intro_dbQuery);
+	$intro_content = $intro_dbResult['intro_text'];	
+} else {
+	$intro_content = '';
+}
 
 
 /* Determines the correct display */
 /* Determines the correct display */