Plugin Directory

Changeset 2836690


Ignore:
Timestamp:
12/20/2022 02:18:38 PM (3 years ago)
Author:
infracontentools
Message:

Image validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-contentools/trunk/includes/class-contentools-rest.php

    r2836682 r2836690  
    603603            $image_extension = pathinfo($_POST['file'][0], PATHINFO_EXTENSION);
    604604
    605             $image_size = wp_getimagesize(empty($_POST['file'][1]));
     605            $image_size = wp_getimagesize($_POST['file'][1]);
    606606
    607607            if (!in_array($image_extension, $allowed_extensions) || empty($image_size)) {
Note: See TracChangeset for help on using the changeset viewer.