Newcrop problems after upgrade from 4.2.1 to 5.0.1


(Craig Sparks) #1

Situation
As a Newcrop admin Newcrop seems to work fine, but if the newcrop role is a physician or otherwise, newcrop cannot be accessed. (blank page is shown). Now when trying to access when a physician level access there are php errors.

OpenEMR Version
I’m using OpenEMR version 5.0.1

Browser:
I’m using: Chrome and Edge

Operating System
I’m using: Windows and Linux

Logs
[Sun Jan 06 21:50:28.925563 2019] [php7:error] [pid 6757] [client 174.230.140.27:1919] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function eRxXMLBuilder::trimData(), 1 passed in /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php on line 659 and exactly 2 expected in /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php:94\nStack trace:\n#0 /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php(659): eRxXMLBuilder->trimData('Medicaid')\n#1 /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php(709): eRxXMLBuilder->getPatientFreeformHealthplans(1912)\n#2 /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php(791): eRxXMLBuilder->getPatient(1912)\n#3 /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxPage.php(212): eRxXMLBuilder->getPatientElements(1912, 60, NULL)\n#4 /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www in /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php on line 94, referer: https://xxx/openemr/interface/main/tabs/main.php [Sun Jan 06 21:50:53.022418 2019] [php7:warn] [pid 23470] [client 174.230.140.27:9824] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php on line 808, referer: https://xxx/openemr/interface/patient_file/summary/demographics.php?set_pid=5005 [Sun Jan 06 21:54:03.571136 2019] [php7:warn] [pid 24964] [client 174.230.140.27:9828] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /xd1/homes/hash/42/60/a16042/17/59/u145917/xxx/www/openemr/interface/eRxXMLBuilder.php on line 808, referer: https://xxx/openemr/interface/patient_file/summary/demographics.php?set_pid=5005


(Stephen Waite) #2

hi @jexmex, try this on line 659 in your 5.0.1


(Craig Sparks) #3

That worked, thanks a bunch. I guess maybe I should have dug into the actual code, but sometimes that takes so long to try to figure out it is better to check to see if somebody else had the issue or if it was a specific problem.


(Stephen Waite) #4

nice, either way, it’s easy to set up a test environment thanks to @d3sandoval’s, @MatthewVita’s and @brady.miller’s work with docker, openemr/CONTRIBUTING.md at master · openemr/openemr · GitHub


(Craig Sparks) #5

Thanks for the link @stephenwaite, not sure I will be doing additional work for the client since my knowledge in HIPAA and OpenEMR is a bit lacking for an occasional side job.