Permalink
Browse files

Fixed a potential notice in Phergie_Plugin_Url->getTitle()

  • Loading branch information...
elazar committed Dec 20, 2012
1 parent c4d53a4 commit cc50550e24b929a504f2ff5ac2895e792cfe4494
Showing with 3 additions and 2 deletions.
  1. +3 −2 Phergie/Plugin/Url.php
View
@@ -615,15 +615,16 @@ public function getTitle($url)
$title = preg_replace('/[\s\v]+/', ' ', trim($match[1]));
}
}
- $titleLength = $this->getConfig('url.titleLength', 40);
- $title = $this->decode($title, $titleLength);
if (empty($title)) {
if ($response->isError() && $this->getConfig('url.showErrors', true)) {
$title = $response->getCodeAsString();
} else {
$title = 'No Title';
}
+ } else {
+ $titleLength = $this->getConfig('url.titleLength', 40);
+ $title = $this->decode($title, $titleLength);
}
return $title;

0 comments on commit cc50550

Please sign in to comment.