Permalink
Browse files

There is no encoding argument of strlen

  • Loading branch information...
1 parent 7f0751a commit ad9bf3de291336b7da7a7634d931f260008ae44b @marc-mabe committed Jan 6, 2013
View
10 library/Zend/Feed/Writer/Extension/ITunes/Entry.php
@@ -84,7 +84,7 @@ public function setItunesBlock($value)
. ' contain alphabetic characters');
}
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only'
. ' contain a maximum of 255 characters');
}
@@ -114,7 +114,7 @@ public function addItunesAuthors(array $values)
*/
public function addItunesAuthor($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only'
. ' contain a maximum of 255 characters each');
}
@@ -178,7 +178,7 @@ public function setItunesKeywords(array $value)
}
$concat = implode(',', $value);
- if ($this->stringWrapper->strlen($concat, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($concat) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "keywords" may only'
. ' have a concatenated length of 255 chars where terms are delimited'
. ' by a comma');
@@ -196,7 +196,7 @@ public function setItunesKeywords(array $value)
*/
public function setItunesSubtitle($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "subtitle" may only'
. ' contain a maximum of 255 characters');
}
@@ -213,7 +213,7 @@ public function setItunesSubtitle($value)
*/
public function setItunesSummary($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 4000) {
+ if ($this->stringWrapper->strlen($value) > 4000) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "summary" may only'
. ' contain a maximum of 4000 characters');
}
View
20 library/Zend/Feed/Writer/Extension/ITunes/Feed.php
@@ -86,7 +86,7 @@ public function setItunesBlock($value)
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only'
. ' contain alphabetic characters');
}
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only'
. ' contain a maximum of 255 characters');
}
@@ -117,7 +117,7 @@ public function addItunesAuthors(array $values)
*/
public function addItunesAuthor($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only'
. ' contain a maximum of 255 characters each');
}
@@ -142,19 +142,19 @@ public function setItunesCategories(array $values)
}
foreach ($values as $key=>$value) {
if (!is_array($value)) {
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only'
. ' contain a maximum of 255 characters each');
}
$this->data['categories'][] = $value;
} else {
- if ($this->stringWrapper->strlen($key, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($key) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only'
. ' contain a maximum of 255 characters each');
}
$this->data['categories'][$key] = array();
foreach ($value as $val) {
- if ($this->stringWrapper->strlen($val, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($val) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only'
. ' contain a maximum of 255 characters each');
}
@@ -239,7 +239,7 @@ public function setItunesKeywords(array $value)
. ' contain a maximum of 12 terms');
}
$concat = implode(',', $value);
- if ($this->stringWrapper->strlen($concat, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($concat) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "keywords" may only'
. ' have a concatenated length of 255 chars where terms are delimited'
. ' by a comma');
@@ -292,8 +292,8 @@ public function addItunesOwner(array $value)
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" must'
. ' be an array containing keys "name" and "email"');
}
- if ($this->stringWrapper->strlen($value['name'], $this->getEncoding()) > 255
- || $this->stringWrapper->strlen($value['email'], $this->getEncoding()) > 255
+ if ($this->stringWrapper->strlen($value['name']) > 255
+ || $this->stringWrapper->strlen($value['email']) > 255
) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" may only'
. ' contain a maximum of 255 characters each for "name" and "email"');
@@ -314,7 +314,7 @@ public function addItunesOwner(array $value)
*/
public function setItunesSubtitle($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 255) {
+ if ($this->stringWrapper->strlen($value) > 255) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "subtitle" may only'
. ' contain a maximum of 255 characters');
}
@@ -331,7 +331,7 @@ public function setItunesSubtitle($value)
*/
public function setItunesSummary($value)
{
- if ($this->stringWrapper->strlen($value, $this->getEncoding()) > 4000) {
+ if ($this->stringWrapper->strlen($value) > 4000) {
throw new Writer\Exception\InvalidArgumentException('invalid parameter: "summary" may only'
. ' contain a maximum of 4000 characters');
}

0 comments on commit ad9bf3d

Please sign in to comment.