File: 1032_include-class_sortableListing.inc-Fix-copy-paste-mis.patch

package info (click to toggle)
gosa 2.8~git20230203.10abe45%2Bdfsg-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,108 kB
  • sloc: php: 32,102; javascript: 10,836; pascal: 3,776; xml: 3,135; sh: 852; python: 162; makefile: 45; perl: 2
file content (29 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 9f823cc51137ab5edccc0d8efe5f221660096c68 Mon Sep 17 00:00:00 2001
From: root <root@postoffice.intern>
Date: Wed, 23 Aug 2023 15:19:20 +0200
Subject: [PATCH 10/13] include/class_sortableListing.inc: Fix copy&paste
 mistake. Don't try to get element 0 of INTEGER $index.

---
 include/class_sortableListing.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class_sortableListing.inc b/include/class_sortableListing.inc
index ee4346f..2e4b59f 100644
--- a/include/class_sortableListing.inc
+++ b/include/class_sortableListing.inc
@@ -763,9 +763,9 @@ class sortableListing
     public function getKey($index)
     {
         if (is_array($index)) {
-            return isset($this->keys[$index[0]])?$this->keys[$index[0]]:null;
+            return isset($this->keys[$index[0]]) ? $this->keys[$index[0]] : null;
         } else {
-            return isset($this->keys[$index[0]])?$this->keys[$index]:null;
+            return isset($this->keys[$index]) ? $this->keys[$index] : null;
         }
     }
 
-- 
2.39.2