Permalink
Browse files

Fixing misleading SimpleImageField deprecation message

  • Loading branch information...
1 parent 27a7fc3 commit bc64de0264f1acf4e33c2029fd3798db4974a511 @halkyon halkyon committed Oct 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 forms/SimpleImageField.php
@@ -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) {

0 comments on commit bc64de0

Please sign in to comment.