Skip to content

Commit

Permalink
Merge pull request #241 from Ebichan/patch-1
Browse files Browse the repository at this point in the history
fix variable naming in nameCallback function
  • Loading branch information
josegonzalez committed Jul 29, 2014
2 parents 06a6379 + ebcc122 commit bed48ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Model/Behavior/UploadBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bed48ba

Please sign in to comment.