Skip to content
Snippets Groups Projects
Commit 99bcd102 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3781

Closes #3781

Merge request studip/studip!2655
parent f0f521cb
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ class Course_LtiController extends StudipController
$lti_data->title = (string) $item['title'];
$lti_data->description = Studip\Markup::purifyHtml(Studip\Markup::markAsHtml($item['text']));
$lti_data->tool_id = $tool_id;
$lti_data->launch_url = (string) $item['url'];
$lti_data->launch_url = (string) ($item['url'] ?? '');
$options = [];
if (is_array($item['custom'])) {
$custom_parameters = '';
......
......@@ -133,8 +133,6 @@ class RegistrationController extends AuthenticatedController
$GLOBALS['auth']->auth['auth_plugin'] = $new_user['auth_plugin'];
$GLOBALS['auth']->auth_set_user_settings($new_user->user_id);
$GLOBALS['auth']->auth['uid'] = $new_user['user_id'];
$GLOBALS['auth']->auth['exp'] = time() + (60 * $GLOBALS['auth']->lifetime);
$GLOBALS['auth']->auth['refresh'] = time() + (60 * $GLOBALS['auth']->refresh);
Seminar_Register_Auth::sendValidationMail($new_user);
......
......@@ -208,7 +208,7 @@ class LtiLink
{
$name = strtolower(preg_replace('/\W/', '_', $name));
$value = preg_replace_callback('/\$([\w.]*\w)/', function($matches) {
return $this->variables[$matches[1]] ?: $matches[0];
return $this->variables[$matches[1]] ?? $matches[0];
}, $value);
$this->addLaunchParameter('custom_' . $name, $value);
......
......@@ -527,7 +527,10 @@ class Form extends Part
return function ($value) use ($context, $input) {
if ($context && !$value && $value !== null) {
$metadata = $context->getTableMetadata();
if ($metadata['fields'][$input->getName()]['null'] === 'YES') {
if (
isset($metadata['fields'][$input->getName()]['null'])
&& $metadata['fields'][$input->getName()]['null'] === 'YES'
) {
//sets the value to null if this is a feasible db value for this field:
$value = null;
}
......
......@@ -699,7 +699,7 @@ class smtp_message_class extends email_message_class
$message_id_set=1;
break;
}
if(strcmp($error,""))
if(strcmp($error ?? null,""))
return($this->ResetConnection($error));
if(strtolower($header_name)=="bcc")
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment