Speech Dictation doesn't work on new posts

jwallace00 wrote on Tuesday, August 11, 2009:

Hello, 

  I am working with Dr. Bowen and this issue was brought to my attention earlier today.   After some troubleshooting,  I observed behavior where new speech dictation entries were blank,  but new Additional Notes entries would complete successfully.   Additionally,  an update for each entry would work without issue.  
  I eventaully traced the problem to $_POST getting passed from interface/forms/dictation/save.php  to formSubmit.php in library/api.inc.    The problematic line 35 in api.inc.    The while loop was only processing the additional notes key/value pair for reasons partially unknown.   I added 2 debug sections to save.php to dump the values of $_POST before the formSubmit function call.   The first section was using the while method in question while the second section used foreach($_POST as $key=>$value).     The foreach loop output both the dictation and additional notes section.  

In api.inc, I changed the while loop to use the foreach method and this problem is resolved.  

We are running OpenEMR 3.0.1 CVS on PHP Version 5.2.10-pl0-gentoo with apache-2.2.11-r2 and mysql 5.0.70.   The only think I can think is that our version of php handles superglobals in an odd way with the each() function.   It’s most likely a bug with php,  but this should be an equivalent work around.