Merge pull request #8076 from appwrite/fix-tests-for-cl-1

Fix tests for CL
This commit is contained in:
Jake Barnby
2024-05-09 17:36:10 +12:00
committed by GitHub
7 changed files with 19 additions and 17 deletions
+1 -1
View File
@@ -263,7 +263,7 @@ class Phpass extends Hash
*/
$itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$output = '$2a$';
$output .= chr(ord('0') + $options['iteration_count_log2'] / 10);
$output .= chr(ord('0') + intval($options['iteration_count_log2'] / 10));
$output .= chr(ord('0') + $options['iteration_count_log2'] % 10);
$output .= '$';
$i = 0;
+1 -1
View File
@@ -34,7 +34,7 @@ class Event extends Validator
public function isValid($value): bool
{
$events = Config::getParam('events', []);
$parts = \explode('.', $value);
$parts = \explode('.', $value ?? '');
$count = \count($parts);
if ($count < 2 || $count > 7) {
@@ -13,7 +13,7 @@ class FunctionEvent extends Event
*/
public function isValid($value): bool
{
if (str_starts_with($value, 'functions.')) {
if (str_starts_with($value ?? false, 'functions.')) {
$this->message = 'Triggering a function on a function event is not allowed.';
return false;
}