Error when adding an image block to a site page
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When you create a site page and add an image block, the warning below appears when you navigate away from the page.
Robert says:
"Why does htdocs/
---
if (!empty(
$tabdata = pieform_
...
---
Then
---
if ($viewowner['type'] == 'institution' && $viewowner['id'] == 'mahara') {
// No filebrowser tabs for site views
return null;
}
---
"I believe the problem relates to those two bits of code".
How to replicate:
1. Create a site page
2. Add the 'Image' block, upload an image, and save the block configuration.
3. Go to the 'Edit access' page (for example).
Expected result: The page loads correctly.
Actual result: The error message below.
[WAR] 6d (lib/form/
Call stack (most recent first):
log_
error(8, "Trying to access array offset on value of type nul...", "/home/
pieform_
Pieform-
Pieform-
BlockInstan
BlockInstan
View-
View-
[WAR] 4e (lib/form/
Call stack (most recent first):
log_
error(8, "Trying to access array offset on value of type nul...", "/home/
pieform_
Pieform-
Pieform-
Pieform-
Pieform-
BlockInstan
Pieform-
pieform_
BlockInstan
Changed in mahara: | |
milestone: | none → 21.04.1 |
summary: |
- Error when adding image block to site page + Error when adding an image block to a site page |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
milestone: | 21.04.1 → 21.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/11698