I am working on an LBF form that will not save on an Ubuntu box.
Ubuntu 16.04.5 LTS
MySQL 5.7.24
PHP 7.02
The form was originally built on a Windows server then database was transferred to an Ubuntu server.
I looked at the log file and found these entries for the LBF editor.
[Mon Dec 03 13:23:38.002240 2018] [:error] [pid 16574] [client 70.184.177.14:51361] PHP Notice: Undefined index: edit_options in /var/www/html/t/interface/super/edit_layout.php on line 392, referer: https://openemr/interface/super/edit_layout.php
[Mon Dec 03 13:23:38.002246 2018] [:error] [pid 16574] [client 70.184.177.14:51361] PHP Notice: Undefined index: validation in /var/www/html/t/interface/super/edit_layout.php on line 396, referer: https://openemr/interface/super/edit_layout.php
[Mon Dec 03 13:23:38.005497 2018] [:error] [pid 16574] [client 70.184.177.14:51361] PHP Notice: Undefined index: action in /var/www/html/t/interface/super/edit_layout.php on line 350, referer: https://openemr/interface/super/edit_layout.php
[Mon Dec 03 13:23:38.005520 2018] [:error] [pid 16574] [client 70.184.177.14:51361] PHP Notice: Undefined index: edit_options in /var/www/html/t/interface/super/edit_layout.php on line 392, referer: https://openemr/interface/super/edit_layout.php
I did some research on the error message and found this:
https://stackoverflow.com/questions/4261133/notice-undefined-variable-notice-undefined-index-and-notice-undefined
https://wiki.php.net/rfc/isset_ternary
My question is about line 350
$action = $iter['action']
Changing it to this:
$action = $iter['action'] ?? '';
Comments suggestion
@robert.down
The not saving had nothing to do with the error messages in the log but I needed to increase the max_input_vars to 4000.
But changing the line 350 got rid of the error message.