Merge pull request #401 from trammel/master

Minor refactor for php v5.3, which doesn't support immediate dereferencing of array entries
master
Andrew Dolgov 10 years ago
commit 76fc1f83e1

@ -621,7 +621,8 @@
$entry_language = $lang->detect($entry_title . " " . $entry_content, 1); $entry_language = $lang->detect($entry_title . " " . $entry_content, 1);
if (count($entry_language) > 0) { 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); _debug("detected language: $entry_language", $debug_enabled);
} else { } else {

Loading…
Cancel
Save