Merge pull request #4654 from appwrite/fix-test-warnings
Fix null warnings
This commit is contained in:
commit
e72c5511b6
4 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
# Version 1.2.1
|
||||
## Bugs
|
||||
- Fix a few null safety warnings [#4654](https://github.com/appwrite/appwrite/pull/4654)
|
||||
|
||||
# Version 1.2.0
|
||||
## Features
|
||||
- Added GraphQL API [#974](https://github.com/appwrite/appwrite/pull/974)
|
||||
|
|
|
@ -242,8 +242,8 @@ App::get('/v1/avatars/favicon')
|
|||
case 'jpeg':
|
||||
$size = \explode('x', \strtolower($sizes));
|
||||
|
||||
$sizeWidth = (int) $size[0] ?? 0;
|
||||
$sizeHeight = (int) $size[1] ?? 0;
|
||||
$sizeWidth = (int) ($size[0] ?? 0);
|
||||
$sizeHeight = (int) ($size[1] ?? 0);
|
||||
|
||||
if (($sizeWidth * $sizeHeight) >= $space) {
|
||||
$space = $sizeWidth * $sizeHeight;
|
||||
|
|
|
@ -549,6 +549,11 @@ App::post('/v1/storage/buckets/:bucketId/files')
|
|||
$sizeActual = $deviceFiles->getFileSize($path);
|
||||
$fileHash = $deviceFiles->getFileHash($path);
|
||||
|
||||
$openSSLVersion = null;
|
||||
$openSSLCipher = null;
|
||||
$openSSLTag = null;
|
||||
$openSSLIV = null;
|
||||
|
||||
if ($bucket->getAttribute('encryption', true) && $fileSize <= APP_STORAGE_READ_BUFFER) {
|
||||
$openSSLVersion = '1';
|
||||
$openSSLCipher = OpenSSL::CIPHER_AES_128_GCM;
|
||||
|
|
|
@ -46,6 +46,10 @@ class CNAME extends Validator
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!$records) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($records as $record) {
|
||||
if (isset($record['target']) && $record['target'] === $this->target) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue