My favorites | Sign in
Project Home Downloads Wiki Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
*** ./Twitter.php.org 2010-02-23 18:34:21.000000000 +0900
--- ./Twitter.php 2010-02-24 01:44:40.000000000 +0900
***************
*** 755,762 ****
*/
protected function validateArg($name, &$val, $type, $maxLength = null)
{
! // check length if necessary
! if ($maxLength !== null && strlen($val) > $maxLength) {
throw new Exception(
$name . ' must not exceed ' . $maxLength . ' chars',
self::ERROR_PARAMS
--- 755,767 ----
*/
protected function validateArg($name, &$val, $type, $maxLength = null)
{
! // check length if necessary
! if (function_exists('mb_strlen')) {
! $_length = mb_strlen($val, 'UTF-8');
! } else {
! $_length = strlen($val);
! }
! if ($maxLength !== null && $_length > $maxLength) {
throw new Exception(
$name . ' must not exceed ' . $maxLength . ' chars',
self::ERROR_PARAMS

Change log

r34 by nocontents on Feb 23, 2010   Diff
Services_Twitter strlen problem patch
Go to: 

Older revisions

All revisions of this file

File info

Size: 969 bytes, 26 lines
Powered by Google Project Hosting