I have zbarcode and mpdf installed on my apache server. Once in a while i get an mpdf error stating that zbarcode module is already loaded when generating a pdf. 98% of the time there is no error and i cannot seem to replicate it. I have searched but found only that mpdf is trying to load the zbarcode module when it is already loaded. But then why is the error not constant and has anybody experienced this and found a solution for this error?
I can try solving this by modifying the mpdf classes but i do not want to make modifications to libraries downloaded with composer. Any other suggestions? Can i define a function to check if a module is loaded before reloading it again? dl() is not an option.