Skip to content

Conversation

carlangas159
Copy link
Contributor

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.

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.
@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/38165

This comment was posted by FlintCI. It can be disabled in the repository settings.

@carlangas159
Copy link
Contributor Author

i can't reproduce this on my local chamilo (windows) and into https://dev1.beeznest.com/.

I did several tests and I could not replicate the download of the wrong pdf. Although in a moment I noticed that it was not downloading correctly, 5 seconds later it opened the file correctly.

At the moment on 11.chamilo.org in the following link

https://11.chamilo.org/main/exercise/exercise_show.php?cidReq=NICODU&id_session=0&gidReq=0&gradebook=0&origin=&id=224&action=export&

"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"

There may be no buffer stored when trying to clean, so I check to see if the buffer exists.

It is still possible that the errors in 11.chamilo.org persist regarding:

"Warning: count (): Parameter must be an array or an object that implements Countable in /furanet/sites/11.chamilo.org/web/htdocs/vendor/mpdf/mpdf/classes/otl.php on line 5840"

content is a character string, at the moment it would be good to check if it is a problem by ob_clean

@ywarnier ywarnier merged commit 973edaa into chamilo:1.11.x Jul 30, 2020
@ywarnier
Copy link
Member

As per https://www.php.net/ob_get_contents, this looks like a reasonnable attempt at fixing it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants