nielsrune / saldi_ce

GNU General Public License v2.0
1 stars 0 forks source link

Undefined index / variable / offset / constant #5

Open nielsrune opened 6 years ago

nielsrune commented 6 years ago

https://github.com/nielsrune/saldi_ce/blob/fed89600c8e39c71d803a3c3255f73ff0803cc68/admin/opret.php#L73 Fix [php7 required]: if ( is_null ( $_POST['regnskab'] ?? $_POST['brugernavn'] ?? $_POST['passwd'] ?? $_POST['passwd2'] ?? NULL )) {

https://github.com/nielsrune/saldi_ce/blob/fed89600c8e39c71d803a3c3255f73ff0803cc68/admin/opret.php#L152 Fix: $db=$sqdb."_".$row["id"];

Baggrund: https://stackoverflow.com/questions/4261133/php-notice-undefined-variable-notice-undefined-index-and-notice-undef

http://php.net/manual/en/language.operators.comparison.php#language.operators.comparison.coalesce