aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-08 09:16:27 +0000
committerMario <mario@mariovavti.com>2024-03-08 09:16:27 +0000
commitdeba1863f56a65563bcccd12e28d2cfa9e644256 (patch)
tree45b481e3b27b40a6c751b2e2a5c354093bd79a21 /include
parent0e27f010f976ac4f00e336c01de3cfadb4b26662 (diff)
downloadvolse-hubzilla-deba1863f56a65563bcccd12e28d2cfa9e644256.tar.gz
volse-hubzilla-deba1863f56a65563bcccd12e28d2cfa9e644256.tar.bz2
volse-hubzilla-deba1863f56a65563bcccd12e28d2cfa9e644256.zip
fix php warnings
Diffstat (limited to 'include')
-rw-r--r--include/plugin.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 2a35b72de..cc740f915 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -213,7 +213,7 @@ function reload_plugins() {
if(function_exists($pl . '_unload')) {
$func = $pl . '_unload';
try {
- $func();
+ $func();
} catch (Exception $e) {
handleerrors_plugin($pl, '', 'UNLOAD FAILED (uninstalling) : ' . $e->getMessage(),true);
continue;
@@ -222,7 +222,7 @@ function reload_plugins() {
if(function_exists($pl . '_load')) {
$func = $pl . '_load';
try {
- $func();
+ $func();
} catch (Exception $e) {
handleerrors_plugin($pl, '', 'LOAD FAILED (uninstalling): ' . $e->getMessage(),true);
continue;
@@ -556,7 +556,11 @@ function get_plugin_info($plugin){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {
$l = trim($l, "\t\n\r */");
- if ($l != ""){
+ if ($l != "") {
+ if (strpos($l, ':') === false) {
+ continue;
+ }
+
list($k, $v) = array_map("trim", explode(":", $l, 2));
$k = strtolower($k);
if ($k == 'author' || $k == 'maintainer'){
@@ -643,7 +647,11 @@ function get_widget_info($widget){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {
$l = trim($l, "\t\n\r */");
- if ($l != ""){
+ if ($l != "") {
+ if (strpos($l, ':') === false) {
+ continue;
+ }
+
list($k, $v) = array_map("trim", explode(":", $l, 2));
$k = strtolower($k);
if ($k == 'author' || $k == 'maintainer'){
@@ -778,7 +786,11 @@ function get_theme_info($theme){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {
$l = trim($l, "\t\n\r */");
- if ($l != ""){
+ if ($l != "") {
+ if (strpos($l, ':') === false) {
+ continue;
+ }
+
list($k, $v) = array_map("trim", explode(":", $l, 2));
$k = strtolower($k);
if ($k == 'author'){
@@ -860,7 +872,7 @@ function get_template_info($template){
$ll = explode("\n", $m[0]);
foreach( $ll as $l ) {
$l = trim($l, "\t\n\r */");
- if ($l != ""){
+ if ($l != "") {
if (strpos($l, ':') === false) {
continue;
}