Updating OpenEMR from 5.0.0(7) to 5.0.2 was a challenge since 5.0.2 requires PHP 7.1 and up which was not mentioned in the upgrade wiki. Finally with the help of a post from a user, Paulo Kanda Dec '19 , I was able to successfully install 5.0.2 after XAMPP 7.4.4 install and creating a blank ‘openemr’ database with phpmyadmin. Yea! Thanks Paulo!
During the database upgrade to 5.0.2 with sql_upgrade.php I noticed this error repeating hundreds of times:
“Trying to access array offset on value of type bool in translation.inc.php at line 44”
When the upgrade finished I was excited about the successful upgrade but concerned about the error. When trying to login to localhost/openemr I could not because of that same error regarding “translation.inc.php at line 44” filled in all the login spaces. A search on this forum revealed other users had the same problem logging into a recent upgrade. The solution was to disable error reporting in php.ini per a wiki on “What are the correct PHP settings”.
After disabling error reporting (which I am not entirely comfortable with) I was able to log in OK. After a little testing I put openEMR 5.0.2(1) into production. In further testing and looking at the features of this new version I came across this related error. I am concerned that disabling error reporting in php.ini we are masking the real problem that lies somewhere perhaps still unknown.
The new problem and the reason for this post:
In Patient Documents: Document uploader/viewer, there is a new feature “Patient document template forms”. This will be a very useful feature as a companion to the word processor “Document templates” once it is working. Trying to open one of the stock template forms I get this fatal error:
My question is if errors are disabled according to the PHP settings wiki how will we resolve this error and more importantly what is the source of the error?
Fatal Error:
Trying to access array offset on value of type bool in translation.inc.php at line 44
Original Stack Trace:
#0 C:\xampp\htdocs\openemr\library\translation.inc.php(44): ExceptionThrower::HandleError(8, ‘Trying to acces…’, ‘C:\xampp\htdocs…’, 44, Array)
#1 C:\xampp\htdocs\openemr\library\htmlspecialchars.inc.php(138): xl(‘Patient Templat…’)
#2 C:\xampp\htdocs\openemr\library\htmlspecialchars.inc.php(158): hsc_private_xl_or_warn(‘Patient Templat…’)
#3 C:\xampp\htdocs\openemr\portal\patient\templates\OnsiteDocumentListView.tpl.php(30): xlt(‘Patient Templat…’)
#4 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(1022): include(‘C:\xampp\htdocs…’)
#5 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(958): Savant3->fetch(NULL)
#6 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(944): Savant3->getOutput(‘OnsiteDocumentL…’)
#7 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\verysimple\Phreeze\SavantRenderEngine.php(69): Savant3->display(‘OnsiteDocumentL…’)
#8 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\verysimple\Phreeze\Controller.php(850): SavantRenderEngine->display(‘OnsiteDocumentL…’)
#9 C:\xampp\htdocs\openemr\portal\patient\libs\Controller\OnsiteDocumentController.php(87): Controller->Render()
#10 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\verysimple\Phreeze\Dispatcher.php(169): OnsiteDocumentController->ListView()
#11 C:\xampp\htdocs\openemr\portal\patient\index.php(31): Dispatcher::Dispatch(Object(Phreezer), Object(SavantRenderEngine), ‘’, NULL, Object(GenericRouter))
#12 {main}
In addition to the above error, the default error template could not be displayed:
Trying to access array offset on value of type bool in translation.inc.php at line 44
#0 C:\xampp\htdocs\openemr\library\translation.inc.php(44): ExceptionThrower::HandleError(8, ‘Trying to acces…’, ‘C:\xampp\htdocs…’, 44, Array)
#1 C:\xampp\htdocs\openemr\library\htmlspecialchars.inc.php(138): xl(‘Patient Portal’)
#2 C:\xampp\htdocs\openemr\library\htmlspecialchars.inc.php(158): hsc_private_xl_or_warn(‘Patient Portal’)
#3 C:\xampp\htdocs\openemr\portal\patient\templates\DefaultErrorFatal.tpl.php(9): xlt(‘Patient Portal’)
#4 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(1022): include(‘C:\xampp\htdocs…’)
#5 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(958): Savant3->fetch(NULL)
#6 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\savant\Savant3.php(944): Savant3->getOutput(‘DefaultErrorFat…’)
#7 C:\xampp\htdocs\openemr\portal\patient\fwk\libs\verysimple\Phreeze\SavantRenderEngine.php(69): Savant3->display(‘DefaultErrorFat…’)
#8 C:\xampp\htdocs\openemr\portal\patient\index.php(55): SavantRenderEngine->display(‘DefaultErrorFat…’)
#9 {main}