Skip to content

Commit 9b11cff

Browse files
committed
Exercise result: Exporting pdf is impossible #3222
Possible fix to "Notice: ob_clean(): failed to delete buffer. No buffer to delete in /furanet/sites/11.chamilo.org/web/htdocs/main/exercise/exercise_show.php on line 942" https://www.php.net/manual/en/function.ob-clean.php#Hcom114967 Check if had buffer.
1 parent c35cb23 commit 9b11cff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main/exercise/exercise_show.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,7 @@ function getFCK(vals, marksid) {
939939
if ('export' === $action) {
940940
$content = ob_get_clean();
941941
// needed in order to mpdf to work
942-
ob_clean();
943-
942+
if (ob_get_contents()) ob_clean();
944943
$params = [
945944
'filename' => api_replace_dangerous_char(
946945
$objExercise->name.' '.

0 commit comments

Comments
 (0)