Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/dav/lib/Files/FileSearchBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
use SearchDAV\Query\Query;

class FileSearchBackend implements ISearchBackend {
const OPERATOR_LIMIT = 100;
public const OPERATOR_LIMIT = 100;

/** @var CachingTree */
private $tree;
Expand Down Expand Up @@ -432,7 +432,7 @@ private function castValue(SearchPropertyDefinition $property, $value) {
if (is_numeric($value)) {
return max(0, 0 + $value);
}
$date = \DateTime::createFromFormat(\DateTimeInterface::ATOM, $value);
$date = \DateTime::createFromFormat(\DateTimeInterface::ATOM, (string)$value);
return ($date instanceof \DateTime && $date->getTimestamp() !== false) ? $date->getTimestamp() : 0;
default:
return $value;
Expand Down
4 changes: 2 additions & 2 deletions apps/files_external/lib/Lib/Storage/FTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function filemtime($path) {
return $item['type'] === 'cdir';
}));
if ($currentDir) {
$time = \DateTime::createFromFormat('YmdHis', $currentDir['modify']);
$time = \DateTime::createFromFormat('YmdHis', $currentDir['modify'] ?? '');
if ($time === false) {
throw new \Exception("Invalid date format for directory: $currentDir");
}
Expand Down Expand Up @@ -269,7 +269,7 @@ public function fopen($path, $mode) {
case 'wb':
case 'wb+':
$useExisting = false;
// no break
// no break
case 'a':
case 'ab':
case 'r+':
Expand Down
5 changes: 2 additions & 3 deletions apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ protected function createShareObject($data) {
$share->setShareTime($shareTime);
$share->setSharedWith($data['share_with']);
$share->setPassword($data['password']);
$passwordExpirationTime = \DateTime::createFromFormat('Y-m-d H:i:s', $data['password_expiration_time']);
$share->setPasswordExpirationTime($passwordExpirationTime !== false? $passwordExpirationTime : null);
$passwordExpirationTime = \DateTime::createFromFormat('Y-m-d H:i:s', $data['password_expiration_time'] ?? '');
$share->setPasswordExpirationTime($passwordExpirationTime !== false ? $passwordExpirationTime : null);
$share->setLabel($data['label']);
$share->setSendPasswordByTalk((bool)$data['password_by_talk']);
$share->setHideDownload((bool)$data['hide_download']);
Expand Down Expand Up @@ -1140,7 +1140,6 @@ public function userDeletedFromGroup($uid, $gid) {
* @throws ShareNotFound
*/
protected function getRawShare($id) {

// Now fetch the inserted share and create a complete share object
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('*')
Expand Down
4 changes: 2 additions & 2 deletions apps/workflowengine/lib/Check/RequestTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ public function validateCheck($operator, $value) {
}

$values = json_decode($value, true);
$time1 = \DateTime::createFromFormat('H:i e', $values[0]);
$time1 = \DateTime::createFromFormat('H:i e', (string)$values[0]);
if ($time1 === false) {
throw new \UnexpectedValueException($this->l->t('The given start time is invalid'), 3);
}

$time2 = \DateTime::createFromFormat('H:i e', $values[1]);
$time2 = \DateTime::createFromFormat('H:i e', (string)$values[1]);
if ($time2 === false) {
throw new \UnexpectedValueException($this->l->t('The given end time is invalid'), 4);
}
Expand Down