Skip to content

Commit

Permalink
Fixed PHP Fatal and Warnings for "farm" environment (thanks @cultcom #…
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jul 10, 2019
1 parent 9688da8 commit 869d9a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
17 changes: 13 additions & 4 deletions Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2257,11 +2257,20 @@ public function normalizeContent($content)

$plugin_name = $matches[1];

$extension = plugin_load('helper', 'extension_extension');
$extension->setExtension($plugin_name);
if ($extension = plugin_load('helper', 'extension_extension')) {

foreach ($elm->find('legend') as $legend) {
$legend->innertext = '<i class="mdi mdi-puzzle text-success"></i> '. $legend->innertext .' <br/><h6>'. $extension->getDescription() .' <a class="urlextern" href="'. $extension->getURL() .'" target="_blank">Docs</a></h6>';
if ($extension->setExtension($plugin_name)) {

foreach ($elm->find('legend') as $legend) {
$legend->innertext = '<i class="mdi mdi-puzzle text-success"></i> '. $legend->innertext .' <br/><h6>'. $extension->getDescription() .' <a class="urlextern" href="'. $extension->getURL() .'" target="_blank">Docs</a></h6>';
}

}

} else {
foreach ($elm->find('legend') as $legend) {
$legend->innertext = '<i class="mdi mdi-puzzle text-success"></i> '. $legend->innertext;
}
}

}
Expand Down
6 changes: 4 additions & 2 deletions tpl/page-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@

$page_menu = $TEMPLATE->getToolMenu('page');

foreach ($page_menu['menu'] as $type => $item) {
echo $item['html'];
if (isset($page_menu['menu'])) {
foreach ($page_menu['menu'] as $type => $item) {
echo $item['html'];
}
}

?>
Expand Down

0 comments on commit 869d9a2

Please sign in to comment.