Revert "Use regular expression to check for allowed errors instead of strpos so that the string only has to be checked once."
Revert "Use regular expression to check for allowed errors instead of strpos so that the string only has to be checked once."

This reverts commit 7852ed309930b4bdf12061e65bc7b0104e43f7e5.

php-amqplib/php-amqplib,videlalvaro/php-amqplib