Преглед на файлове

Small fix Mastodon share

$a['method'] can be undefined.
https://github.com/FreshRSS/FreshRSS/pull/1674
https://github.com/FreshRSS/FreshRSS/issues/1521
Alexandre Alapetite преди 8 години
родител
ревизия
38de643d09
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      app/FreshRSS.php

+ 2 - 2
app/FreshRSS.php

@@ -111,8 +111,8 @@ class FreshRSS extends Minz_FrontController {
 	public static function preLayout() {
 		switch (Minz_Request::controllerName()) {
 			case 'index':
-				$urlToAuthorize = array_filter(array_map(function($a) {
-					if ('POST' === $a['method']) {
+				$urlToAuthorize = array_filter(array_map(function ($a) {
+					if (isset($a['method']) && $a['method'] === 'POST') {
 						return $a['url'];
 					}
 				}, FreshRSS_Context::$user_conf->sharing));