Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
831642ca
Commit
831642ca
authored
Dec 16, 2014
by
Aaron Wells
Committed by
Gerrit Code Review
Jan 12, 2015
Browse files
Silence a "undefined index" error
Bug 1402912 Change-Id: I519a7ef9bb116baf6fe1186d2e5de681a1543e77
parent
0b07add5
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/text/lib.php
View file @
831642ca
...
...
@@ -29,8 +29,12 @@ class PluginBlocktypeText extends SystemBlocktype {
safe_require
(
'artefact'
,
'file'
);
$configdata
=
$instance
->
get
(
'configdata'
);
// Add all artefacts found in the text
$text
=
$configdata
[
'text'
];
$artefacts
=
array_unique
(
artefact_get_references_in_html
(
$text
));
if
(
empty
(
$configdata
[
'text'
]))
{
$artefacts
=
array
();
}
else
{
$artefacts
=
array_unique
(
artefact_get_references_in_html
(
$configdata
[
'text'
]));
}
return
$artefacts
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment