| Server IP : 186.64.123.29 / Your IP : 216.73.217.94 Web Server : LiteSpeed System : Linux house.hostinglat.cl 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : tuemp9827 ( 1016) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/tuempresavirtual.cl/public_html/wp-content/plugins/webp-express/lib/classes/ |
Upload File : |
<?php
namespace WebPExpress;
use \WebPExpress\ConvertersHelper;
use \WebPExpress\ValidateException;
use \WebPExpress\SanityCheck;
class Validate
{
public static function postHasKey($key)
{
if (!isset($_POST[$key])) {
throw new ValidateException('Expected parameter in POST missing: ' . $key);
}
}
public static function isConverterId($converterId, $errorMsg = 'Not a valid converter id')
{
SanityCheck::pregMatch('#^[a-z]+$#', $converterId, $errorMsg);
if (!in_array($converterId, ConvertersHelper::getDefaultConverterNames())) {
throw new ValidateException($errorMsg);
}
}
}