if (array_key_exists('icon_path', $changedAttributes)) {
$iconFile = $changedAttributes["icon_path"];
}
Why does $iconFile = $changedAttributes["icon_path"];
line gives me below error in php 7.2?
Even though I change it to single quotations ['icon_path']
doesn't solve the problem.
syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
But in php 7.4 there's no problem at all.
I checked my code with this version checker https://www.piliapp.com/php-syntax-check/ 7.2 gives me this error but 7.4 works fine.