diff options
author | David King <imkingdavid@gmail.com> | 2013-05-20 12:20:55 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-05-20 12:20:55 -0400 |
commit | 901955e45264aef53c7b1ddd68d2181032357376 (patch) | |
tree | 5bc959756fe5057a3252c1d426e1fbcb29eb4a9b /phpBB | |
parent | 4fc180ade5098d8efca44327795118c018ef255c (diff) | |
download | forums-901955e45264aef53c7b1ddd68d2181032357376.tar forums-901955e45264aef53c7b1ddd68d2181032357376.tar.gz forums-901955e45264aef53c7b1ddd68d2181032357376.tar.bz2 forums-901955e45264aef53c7b1ddd68d2181032357376.tar.xz forums-901955e45264aef53c7b1ddd68d2181032357376.zip |
[ticket/11551] Fix error in system tab if get_remote_file returns empty string
Currently a debug error is thrown. With this patch, it fails without keeping
the admin from being able to access the rest of the System modules by showing
a nicer error "Failed to obtain latest version information."
PHPBB3-11551
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_update.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_admin.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 7e3d1a1024..5d3e9abcea 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -39,7 +39,7 @@ class acp_update $info = obtain_latest_version_info(request_var('versioncheck_force', false)); - if ($info === false) + if (empty($info)) { trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING); } diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 190185cfcf..a9d1db24a5 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -3319,7 +3319,7 @@ function obtain_latest_version_info($force_update = false, $warn_fail = false, $ $info = get_remote_file('version.phpbb.com', '/phpbb', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); - if ($info === false) + if (empty($info)) { $cache->destroy('versioncheck'); if ($warn_fail) |