summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/image.gd.inc2
-rw-r--r--modules/system/system.api.php2
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 {