appwrite/src/Appwrite/Event/Validator/FunctionEvent.php
Damodar Lohani e25e7f8ec7 fix null
2024-05-06 06:50:36 +00:00

23 lines
459 B
PHP

<?php
namespace Appwrite\Event\Validator;
class FunctionEvent extends Event
{
/**
* Is valid.
*
* @param mixed $value
*
* @return bool
*/
public function isValid($value): bool
{
if (str_starts_with($value ?? false, 'functions.')) {
$this->message = 'Triggering a function on a function event is not allowed.';
return false;
}
return parent::isValid($value);
}
}