Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index fixes #9637

Merged
merged 2 commits into from Mar 24, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/Model/Datasource/Database/MysqlExtended.php
Expand Up @@ -177,6 +177,10 @@ public function execute($sql, $options = [], $params = [])
*/
public function insertMulti($table, $fields, $values)
{
if (empty($values)) {
return true;
}

$table = $this->fullTableName($table);
$holder = substr(str_repeat('?,', count($fields)), 0, -1);
$fields = implode(',', array_map([$this, 'name'], $fields));
Expand Down
2 changes: 1 addition & 1 deletion app/Model/Server.php
Expand Up @@ -583,7 +583,7 @@ private function __pullEvent($eventId, array &$successes, array &$fails, Event $
try {
$this->__checkIfPulledEventExistsAndAddOrUpdate($event, $eventId, $successes, $fails, $eventModel, $serverSync->server(), $user, $jobId, $force, $response);
} catch (Exception $e) {
$title = __('Pulling an event (#%s) from Server #%s has failed. The sync process was not interrupted.', $eventId, $serverSync->server()['id']);
$title = __('Pulling an event (#%s) from Server #%s has failed. The sync process was not interrupted.', $eventId, $serverSync->serverId());
$this->loadLog()->createLogEntry(
$user,
'error',
Expand Down