mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Fix helper method for invalid options in connection classes.
This fix is needed since connection parameters do not respond to __toString() anymore after recent changes.
This commit is contained in:
@@ -177,9 +177,11 @@ abstract class AbstractConnection implements SingleConnectionInterface
|
||||
*/
|
||||
protected function onInvalidOption($option, $parameters = null)
|
||||
{
|
||||
$message = "Invalid option: $option";
|
||||
$class = get_called_class();
|
||||
$message = "Invalid option for connection $class: $option";
|
||||
|
||||
if (isset($parameters)) {
|
||||
$message .= " [$parameters]";
|
||||
$message .= sprintf(' [%s => %s]', $option, $parameters->{$option});
|
||||
}
|
||||
|
||||
throw new NotSupportedException($message);
|
||||
|
||||
Reference in New Issue
Block a user