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

fix generic_includes.php returning error "Undefined variable in /var/www/loris/tools/generic_includes.php on line 28" - 26 branch #9317

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

cmadjar
Copy link
Collaborator

@cmadjar cmadjar commented Aug 7, 2024

Brief summary of changes

This fixes the script generic_includes.php that calls the $DB variable before it is defined when calling LorisInstance.

Without this fix, anything calling generic_includes.php will trigger the following error:

Undefined variable in /var/www/loris/tools/generic_includes.php on line 28
PHP Fatal error:  Uncaught TypeError: LORIS\\LorisInstance::__construct(): Argument #1 ($db) must be of type Database, null given, called in /var/www/loris/tools/generic_includes.php on line 27

@cmadjar cmadjar added Category: Bug PR or issue that aims to report or fix a bug Critical to release PR or issue is key for the release to which it has been assigned 26.0.0-bugs Issues that were raised during the release testing for 26.0.0 labels Aug 7, 2024
@cmadjar cmadjar requested a review from ridz1208 August 7, 2024 19:55
@cmadjar cmadjar closed this Aug 7, 2024
@cmadjar cmadjar reopened this Aug 7, 2024
@cmadjar cmadjar changed the title fix generic_includes.php returning error "Undefined variable in /var/www/loris/tools/generic_includes.php on line 28" fix generic_includes.php returning error "Undefined variable in /var/www/loris/tools/generic_includes.php on line 28" - 26 branch Aug 7, 2024
@driusan
Copy link
Collaborator

driusan commented Aug 12, 2024

These tests seem to all be failing with "./test/dockerized-integration-tests.sh: line 24: docker-compose: command not found" but doesn't look like it's related to the changes in the PR. @kongtiaowang do you have any idea why that would be?

@cmadjar how did you test this? I remember there being some interactions with getDatabaseConnection/Database::singleton/NDB_Factory::database() where they had to be called in a certain order to be consistent, but I'm not sure if that's still an issue now that Database::singleton is removed.

@cmadjar
Copy link
Collaborator Author

cmadjar commented Aug 12, 2024

@driusan this was tested while upgrading HBCD code to 26. The fix in the PR is resolving the broken generic_includes.php

…ww/loris/tools/generic_includes.php on line 28
@cmadjar cmadjar force-pushed the fix_generic_includes branch from 14216db to 0aac66e Compare August 12, 2024 16:43
@driusan driusan merged commit 108f96b into aces:26.0-release Aug 27, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
26.0.0-bugs Issues that were raised during the release testing for 26.0.0 Category: Bug PR or issue that aims to report or fix a bug Critical to release PR or issue is key for the release to which it has been assigned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants