[TASK] Fix a PHP warning in Clipboard 77/28777/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 25 Mar 2014 15:38:48 +0000 (16:38 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 25 Mar 2014 16:13:59 +0000 (17:13 +0100)
Check if the key is available.

Resolves: #57300
Releases: 6.2
Change-Id: I99542a8c0516596b31342a7bce5daa58af4a6432
Reviewed-on: https://review.typo3.org/28777
Reviewed-by: Alexander Stehlik
Reviewed-by: Sebastian Fischer
Reviewed-by: Oliver Klee
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/backend/Classes/Clipboard/Clipboard.php

index 259c83a..f61bf0c 100644 (file)
@@ -429,7 +429,7 @@ class Clipboard {
         */
        public function hasElements() {
                foreach ($this->clipData as $data) {
-                       if (is_array($data['el']) && !empty($data['el'])) {
+                       if (isset($data['el']) && is_array($data['el']) && !empty($data['el'])) {
                                return TRUE;
                        }
                }