Skip to content

Commit

Permalink
Tweak SysVQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
rybakit committed Sep 9, 2014
1 parent b73aa0f commit 76bccac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SysVQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static function getErrorMessage($errorCode)

$error = error_get_last();
if ($error && 0 === strpos($error['message'], 'msg_')) {
return preg_replace('/^msg_[^(]+?\(\)\:\s*/', '', $error['message']);
return preg_replace('/^msg_[^:]+?\:\s/', '', $error['message']);
}

return 'Unknown error.';
Expand Down
2 changes: 1 addition & 1 deletion tests/Queue/SysVQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getUnsupportedItemTypes()
/**
* @dataProvider provideItemsOfUnsupportedTypes
* @expectedException \Phive\Queue\QueueException
* @expectedExceptionMessage Message parameter must be either a string or a number.
* @expectedExceptionMessage /^Message parameter must be either a string or a number\./
*/
public function testUnsupportedItemType($item)
{
Expand Down

0 comments on commit 76bccac

Please sign in to comment.