Skip to content
New issue

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

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

Already on GitHub? # to your account

[Instrument] Fix type error in some instruments #7725

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Oct 18, 2021

When accessing an instrument from RB, I got the error:

Fatal error: Uncaught TypeError: Argument 1 passed to ValidatableIdentifier::__construct() must be of the type string, null given, called in
/home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc on line 2863 and defined in /home/driusan/Code/Loris/php/libraries/Valida
tableIdentifier.php:57 Stack trace: #0 /home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc(2863): ValidatableIdentifier->__co
nstruct(NULL) #1 /home/driusan/Code/Loris/src/Middleware/UserPageDecorationMiddleware.php(241): NDB_BVL_Instrument->handle(Object(Laminas\Dia
ctoros\ServerRequest)) #2 /home/driusan/Code/Loris/src/Middleware/PageDecorationMiddleware.php(57): LORIS\Middleware\UserPageDecorationMiddle
ware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #3 /home/driusan/Code/Loris/php/libraries/NDB_Page.cl
ass.inc(735): LORIS\Middleware\PageDecorationMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #4
 /home/driusan/Code/Loris/php/libraries/NDB_BVL_In in /home/driusan/Code/Loris/php/libraries/ValidatableIdentifier.php on line 57

This fixes the type error so that the instrument page loads.

Brief summary of changes

  • Have you updated related documentation?

Testing instructions (if applicable)

Link(s) to related issue(s)

  • Resolves # (Reference the issue this fixes, if any.)

When accessing an instrument from RB, I got the error:

```
Fatal error: Uncaught TypeError: Argument 1 passed to ValidatableIdentifier::__construct() must be of the type string, null given, called in
/home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc on line 2863 and defined in /home/driusan/Code/Loris/php/libraries/Valida
tableIdentifier.php:57 Stack trace: #0 /home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc(2863): ValidatableIdentifier->__co
nstruct(NULL) #1 /home/driusan/Code/Loris/src/Middleware/UserPageDecorationMiddleware.php(241): NDB_BVL_Instrument->handle(Object(Laminas\Dia
ctoros\ServerRequest)) #2 /home/driusan/Code/Loris/src/Middleware/PageDecorationMiddleware.php(57): LORIS\Middleware\UserPageDecorationMiddle
ware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #3 /home/driusan/Code/Loris/php/libraries/NDB_Page.cl
ass.inc(735): LORIS\Middleware\PageDecorationMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #4
 /home/driusan/Code/Loris/php/libraries/NDB_BVL_In in /home/driusan/Code/Loris/php/libraries/ValidatableIdentifier.php on line 57
```

This fixes the type error so that the instrument page loads.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants