8000 minor #21454 [Cache] Fix trigger_error (jderusse) · dunglas/symfony@6791124 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6791124

Browse files
minor symfony#21454 [Cache] Fix trigger_error (jderusse)
This PR was squashed before being merged into the 3.3-dev branch (closes symfony#21454). Discussion ---------- [Cache] Fix trigger_error | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | NA Commits ------- ca38551 [Cache] Fix trigger_error
2 parents bcf8b68 + ca38551 commit 6791124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Cache/Traits/MemcachedTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ public static function createConnection($servers, array $options = array())
7373
} elseif (!is_array($servers)) {
7474
throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, %s given.', gettype($servers)));
7575
}
76+
if (!static::isSupported()) {
77+
throw new CacheException('Memcached >= 2.2.0 is required');
78+
}
7679
set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); });
7780
try {
78-
if (!static::isSupported()) {
79-
throw new trigger_error('Memcached >= 2.2.0 is required');
80-
}
8181
$options += static::$defaultClientOptions;
8282
$client = new \Memcached($options['persistent_id']);
8383
$username = $options['username'];

0 commit comments

Comments
 (0)
0