There is an error in this version. There is an erroneous & in line 627
//Check to see what options exists and add the ones that don't, keeping the values for the ones that do
foreach($afdnOptions as $key => &$value){
if(array_key_exists($key, $theOptions)){
$value = $theOptions["$key"];
Remove that and it should be fine.