Skip to content

Commit 76bccac

Browse files
committed
Tweak SysVQueue
1 parent b73aa0f commit 76bccac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/SysVQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private static function getErrorMessage($errorCode)
117117

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

123123
return 'Unknown error.';

tests/Queue/SysVQueueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function getUnsupportedItemTypes()
2525
/**
2626
* @dataProvider provideItemsOfUnsupportedTypes
2727
* @expectedException \Phive\Queue\QueueException
28-
* @expectedExceptionMessage Message parameter must be either a string or a number.
28+
* @expectedExceptionMessage /^Message parameter must be either a string or a number\./
2929
*/
3030
public function testUnsupportedItemType($item)
3131
{

0 commit comments

Comments
 (0)