I had the same issue on dctalksolo.com the one I had to edit was:
if (!$fx) {
$location = figurelocation();Otherwise 404 city... I tried using just the other as Ron sugguested:
if(!preg_match("/^d{8}$/", $var)) {
$location = figurelocation();But no go