Commit 1091571f authored by Patrick Barroca's avatar Patrick Barroca

dev #46014 : fix test warnings

parent ec402152
......@@ -36,9 +36,11 @@ class Class_CmsUrlTransformer {
public static function imgUrlRelativeToAbsolute($content) {
return preg_replace('/(< *img[^>]*src *= *["\']?)\/([^"\']*)/i',
'$1http://'.$_SERVER['HTTP_HOST'].'/$2',
$content);
return isset($_SERVER['HTTP_HOST'])
? preg_replace('/(< *img[^>]*src *= *["\']?)\/([^"\']*)/i',
'$1http://'.$_SERVER['HTTP_HOST'].'/$2',
$content)
: $content;
}
......
......@@ -313,8 +313,10 @@ class Class_Newsletter extends Storm_Model_Abstract {
public function subscribeToDedicatedGroup($user) {
$this->getDedicatedGroup()->addUser($user);
$this->save();
$this->getDedicatedGroup()
->addUser($user)
->save();
return $this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment