diff --git a/Model/Behavior/UploadBehavior.php b/Model/Behavior/UploadBehavior.php index 39c7a8cc..c2faa278 100644 --- a/Model/Behavior/UploadBehavior.php +++ b/Model/Behavior/UploadBehavior.php @@ -1074,7 +1074,7 @@ protected function _retrieveName(Model $model, $field, $currentName, $data, $opt $newName = $model->{$callback}($field, $currentName, $data, $options); } - if (!is_string($_filename) || strlen($_filename) == 0) { + if (!is_string($newName) || strlen($newName) == 0) { CakeLog::write('debug', sprintf(__('No filename after parsing. Function %s returned an invalid filename'), $callback)); } else { $name = $newName;