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

Circumvent Undefined property warning resolves kaltura#405. #1

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

djarran
Copy link

@djarran djarran commented Feb 19, 2024

Description: This resolves kaltura#405 (see for more information) allowing plugin install to occur without warnings or errors

Problem

== Setting new default values ==

Warning: Undefined property: stdClass::$lti_version in /var/www/site/local/kaltura/locallib.php on line 795

Code that is causing the error

795if (!empty($configsettings->kaf_uri) && $configsettings->lti_version == LTI_VERSION_1P3) {
796    if (isset($configsettings->lti_version) && (!empty($configsettings->kaf_uri) && $configsettings->lti_version == LTI_VERSION_1P3)) {
797        $configsettings->public_keyset_url = $configsettings->kaf_uri . '/hosted/index/lti-advantage-key-set';
798        $configsettings->public_keyset_url = $configsettings->kaf_uri . '/hosted/index/lti-advantage-key-set';
799        $configsettings->launch_url = $configsettings->kaf_uri . '/hosted/index/oidc-init';
800        $configsettings->launch_url = $configsettings->kaf_uri . '/hosted/index/oidc-init';
801        $configsettings->redirection_uris = $configsettings->kaf_uri . '/hosted/index/oauth2-launch';
802        $configsettings->redirection_uris = $configsettings->kaf_uri . '/hosted/index/oauth2-launch';
803    }

Solution

Check that $configsettings->lti_version is set first

if (isset($configsettings->lti_version) && (!empty($configsettings->kaf_uri) && $configsettings->lti_version == LTI_VERSION_1P3)) {
    ...
}

@golenkovm golenkovm merged commit b2cbf71 into CATALYST_401_STABLE Feb 19, 2024
@golenkovm
Copy link

Thanks @djarran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants