diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-28 02:27:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-28 02:27:09 +0000 |
commit | 1d0f6479da4cdbd14b747ead6cb934a769a9579d (patch) | |
tree | 3875e9403a28aac4477a3531379c85b6b10cd660 /modules/system | |
parent | 0344a78d9643d97e1aff8ab94fec551bc091bfbc (diff) | |
download | brdo-1d0f6479da4cdbd14b747ead6cb934a769a9579d.tar.gz brdo-1d0f6479da4cdbd14b747ead6cb934a769a9579d.tar.bz2 |
- Patch #839556 by jrchamp, dmitrig01: remove pointless usage of array_key_exists().
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/image.gd.inc | 2 | ||||
-rw-r--r-- | modules/system/system.api.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/system/image.gd.inc b/modules/system/image.gd.inc index 2f7a89fce..b10595f47 100644 --- a/modules/system/image.gd.inc +++ b/modules/system/image.gd.inc @@ -351,7 +351,7 @@ function image_gd_get_info(stdClass $image) { if (isset($data) && is_array($data)) { $extensions = array('1' => 'gif', '2' => 'jpg', '3' => 'png'); - $extension = array_key_exists($data[2], $extensions) ? $extensions[$data[2]] : ''; + $extension = isset($extensions[$data[2]]) ? $extensions[$data[2]] : ''; $details = array( 'width' => $data[0], 'height' => $data[1], diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 262f53757..11780eec7 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2645,7 +2645,7 @@ function hook_file_url_alter(&$uri) { // Serve files with one of the CDN extensions from CDN 1, all others from // CDN 2. $pathinfo = pathinfo($path); - if (array_key_exists('extension', $pathinfo) && in_array($pathinfo['extension'], $cdn_extensions)) { + if (isset($pathinfo['extension']) && in_array($pathinfo['extension'], $cdn_extensions)) { $uri = $cdn1 . '/' . $path; } else { |