Skip to content

Commit

Permalink
Fixing misleading SimpleImageField deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
halkyon committed Oct 11, 2012
1 parent 27a7fc3 commit bc64de0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forms/SimpleImageField.php
Expand Up @@ -64,14 +64,14 @@
*/

/**
* @deprecated 3.0 Use UploadField with $myField->allowedExtensions = array('jpg', 'gif', 'png')
* @deprecated 3.0 Use UploadField with $myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'));
*/
class SimpleImageField extends FileField {

public function __construct($name, $title = null, $value = null) {
Deprecation::notice('3.0',
"SimpleImageField is deprecated. Use UploadField with "
. "\$myField->allowedExtensions = array('jpg', 'gif', 'png')",
. "\$myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'))",
Deprecation::SCOPE_CLASS);

if(count(func_get_args()) > 3) {
Expand Down

0 comments on commit bc64de0

Please sign in to comment.