summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Module.php2
-rw-r--r--app/Stats.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/app/Module.php b/app/Module.php
index 7ae01a6add..6cbb2b6ae0 100644
--- a/app/Module.php
+++ b/app/Module.php
@@ -249,7 +249,7 @@ abstract class Module {
if (file_exists(WT_ROOT . WT_MODULES_DIR . $module_name . '/module.php')) {
require_once WT_ROOT . WT_MODULES_DIR . $module_name . '/module.php';
$class = 'Webtrees\\' . $module_name . '_WT_Module';
- $interface = 'Webtrees\\' . ucfirst($component) . 'Interface';
+ $interface = 'Webtrees\\Module' . ucfirst($component) . 'Interface';
$module = new $class;
// Check that this module is still implementing the desired interface.
if ($module instanceof $interface) {
diff --git a/app/Stats.php b/app/Stats.php
index c997a5141a..e7b77b30f4 100644
--- a/app/Stats.php
+++ b/app/Stats.php
@@ -2925,7 +2925,7 @@ class Stats {
}
$husb = $family->getHusband();
$wife = $family->getWife();
- if (($husb->getAllDeathDates() && $wife->getAllDeathDates()) || !$husb->isDead() || !$wife->isDead()) {
+ if ($husb && $wife && ($husb->getAllDeathDates() && $wife->getAllDeathDates() || !$husb->isDead() || !$wife->isDead())) {
if ($family->canShow()) {
if ($type == 'list') {
$top10[] = "<li><a href=\"" . $family->getHtmlUrl() . "\">" . $family->getFullName() . "</a> (" . $age . ")" . "</li>";
@@ -5478,10 +5478,10 @@ class Stats {
*/
public function userName($params = array()) {
if (Auth::check()) {
- return Auth::user()->getUserName();
+ return Filter::escapeHtml(Auth::user()->getUserName());
} elseif (isset($params[0]) && $params[0] != '') {
// if #username:visitor# was specified, then "visitor" will be returned when the user is not logged in
- return $params[0];
+ return Filter::escapeHtml($params[0]);
} else {
return '';
}
@@ -5491,7 +5491,7 @@ class Stats {
* @return string
*/
public function userFullName() {
- return Auth::check() ? Auth::user()->getRealName() : '';
+ return Auth::check() ? Filter::escapeHtml(Auth::user()->getRealName()) : '';
}
/**