Skip to content
Snippets Groups Projects
Commit a9fde2f9 authored by Ofer Shaal's avatar Ofer Shaal
Browse files

Update deprecated code

parent 824a7c12
No related branches found
Tags 7.x-1.4-beta1
No related merge requests found
<?php
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\file\Entity\File;
......@@ -37,7 +38,7 @@ function _simplytest_theme_header_bg_validate($element, FormStateInterface $form
global $base_url;
$validators = array('file_validate_extensions' => array('png gif jpg jpeg apng svg'));
$files = file_save_upload('header_bg', $validators, "public://", NULL, FILE_EXISTS_REPLACE);
$files = file_save_upload('header_bg', $validators, "public://", NULL, FileSystemInterface::EXISTS_REPLACE);
if (!empty($files)) {
// change file's status from temporary to permanent and update file database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment