Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Serializer.php #553

Merged
merged 10 commits into from
May 2, 2018
2 changes: 1 addition & 1 deletion lib/Raven/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function serializeString($value)
}

if (strlen($value) > 1024) {
$value = substr($value, 0, 1014) . ' {clipped}';
$value = mb_substr($value, 0, 1014) . ' {clipped}';
}

return $value;
Expand Down
2 changes: 1 addition & 1 deletion test/Raven/Tests/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function testLongString()
}
$result = $serializer->serialize($input);
$this->assertInternalType('string', $result);
$this->assertLessThanOrEqual(1024, strlen($result));
$this->assertLessThanOrEqual(1024, mb_strlen($result));
}
}
}
Expand Down