`$_FILES[...]['error']` should be `int` and not `string`
Closed this issue · 1 comments
TobiasBg commented
In my plugin, I'm using UPLOAD_ERR_OK !== $_FILES['form-field-name']['error'] to check for issues with file uploads (from an <input type="file" name="form-field-name" /> in this example).
The UPLOAD_ERR_OK constant in PHP normally is an int, see https://3v4l.org/WjW2j .
However, in WordPress Playground, $_FILES['form-field-name']['error'] returns a string.
Maybe something in
needs to be adjusted?