Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/www/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.1-apache
FROM php:7.3-apache-stretch

ARG XDEBUG_REMOTE_ENABLE=1
ARG XDEBUG_REMOTE_CONNECT_BACK=0
Expand Down
4 changes: 2 additions & 2 deletions forum/qa-include/app/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
if (@$options['categoryview'] && isset($post['categoryname']) && isset($post['categorybackpath'])) {
$favoriteclass='';

if (count(@$favoritemap['category'])) {
if (isset($favoritemap['category']) && count(@$favoritemap['category'])) {
if (@$favoritemap['category'][$post['categorybackpath']])
$favoriteclass=' qa-cat-favorited';

Expand Down Expand Up @@ -1507,7 +1507,7 @@ function qa_set_display_rules(&$qa_content, $effects)
also combine multiple DOM IDs using JavaScript(=PHP) operators. This is twisted but rather convenient.
*/
{
$function='qa_display_rule_'.count(@$qa_content['script_lines']);
$function='qa_display_rule_'.count($qa_content['script_lines'] ?? []);

$keysourceids=array();

Expand Down
2 changes: 1 addition & 1 deletion forum/qa-include/app/q-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function qa_q_list_page_content($questions, $pagesize, $start, $count, $sometitl
if (empty($qa_content['page_links']))
$qa_content['suggest_next']=$suggest;

if (qa_using_categories() && count($navcategories) && isset($categorypathprefix))
if (isset($navcategories, $categorypathprefix) && qa_using_categories() && count($navcategories))
$qa_content['navigation']['cat']=qa_category_navigation($navcategories, $categoryid, $categorypathprefix, $categoryqcount, $categoryparams);

if (isset($feedpathprefix) && (qa_opt('feed_per_category') || !isset($categoryid)) )
Expand Down
11 changes: 6 additions & 5 deletions forum/qa-include/qa-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,12 @@ function qa_content_prepare($voting=false, $categoryids=null)
$navpages=qa_db_get_pending_result('navpages');
$widgets=qa_db_get_pending_result('widgets');

if (isset($categoryids) && !is_array($categoryids)) // accept old-style parameter
$categoryids=array($categoryids);

$lastcategoryid=count($categoryids) ? end($categoryids) : null;
$charset = 'utf-8';
// accept old-style parameter
if (isset($categoryids) && !is_array($categoryids)) {
$categoryids = [$categoryids];
$lastcategoryid = count($categoryids) ? end($categoryids) : null;
}
$charset = 'utf-8';

$qa_content=array(
'content_type' => 'text/html; charset='.$charset,
Expand Down
4 changes: 2 additions & 2 deletions forum/qa-include/qa-theme-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function widgets($region, $place)
Output the widgets (as provided in $this->content['widgets']) for $region and $place
*/
{
if (count(@$this->content['widgets'][$region][$place])) {
if (isset($this->content['widgets'][$region][$place]) && count(@$this->content['widgets'][$region][$place])) {
$this->output('<div class="qa-widgets-'.$region.' qa-widgets-'.$region.'-'.$place.'">');

foreach ($this->content['widgets'][$region][$place] as $module) {
Expand Down Expand Up @@ -574,7 +574,7 @@ public function nav_item($key, $navlink, $class, $level=null)
(@$navlink['state'] ? (' qa-'.$class.'-'.$navlink['state']) : '').' qa-'.$class.'-'.$suffix.'">');
$this->nav_link($navlink, $class);

if (count(@$navlink['subnav']))
if (isset($navlink['subnav']) && count(@$navlink['subnav']))
$this->nav_list($navlink['subnav'], $class, 1+$level);

$this->output('</li>');
Expand Down
18 changes: 1 addition & 17 deletions forum/qa-include/vendor/PHPMailer/PHPMailerAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,4 @@ function PHPMailerAutoload($classname)
}
}

if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
/**
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
function __autoload($classname)
{
PHPMailerAutoload($classname);
}
}
spl_autoload_register('PHPMailerAutoload', true, true);
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function process_request($request)
$itemIcon = '<div class="nicon nbestanswer"></div>';
break;
default:
continue;
continue 2;
}
}

Expand Down