Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing misleading SimpleImageField deprecation message

  • Loading branch information...
commit bc64de0264f1acf4e33c2029fd3798db4974a511 1 parent 27a7fc3
@halkyon halkyon authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 forms/SimpleImageField.php
View
4 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) {
Please sign in to comment.
Something went wrong with that request. Please try again.