From: Jonathon Padfield Date: Wed, 20 Aug 2014 01:16:52 +0000 (+0000) Subject: Minor refactor for php v5.3, which doens't support immediate dereferencing of array... X-Git-Tag: 1.14~21^2^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5d2e74a95e2bd159346f31c79b4afa08e6ac1d2c;p=tt-rss.git Minor refactor for php v5.3, which doens't support immediate dereferencing of array entries --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 614cdaa8..cec44cd8 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -621,7 +621,8 @@ $entry_language = $lang->detect($entry_title . " " . $entry_content, 1); if (count($entry_language) > 0) { - @$entry_language = array_keys($entry_language)[0]; + $possible = array_keys($entry_language); + $entry_language = $possible[0]; _debug("detected language: $entry_language", $debug_enabled); } else {