Viktor's Supportboard (https://www.v-gn.de/wbb/index.php)
- Support (https://www.v-gn.de/wbb/board.php?boardid=6)
-- Hack & Addon Support (wBB2.3.x) (https://www.v-gn.de/wbb/board.php?boardid=71)
--- [wBB 2.3.x] FileInfos4ThreadAttachments - V1.0.1 (https://www.v-gn.de/wbb/thread.php?threadid=16542)
Geschrieben von Shorty1968 am 08.09.2019 um 19:08:
[wBB 2.3.x] FileInfos4ThreadAttachments - V1.0.1
Hallo,
ich habe mir hier aus der Db den [wBB 2.3.x] FileInfos4ThreadAttachments - V1.0.1 Hack heruntergeladen,aber bei den Dateianhängen wie z.b. .zip,.rar usw habe ich ein Problem dort wird es nicht richtig angezeigt.
Leider weis ich nicht wo genau ich anfangen soll den Fehler zu suchen und hoffe eure Hilfe kann mir auf die sprünge helfen.
Geschrieben von Viktor am 09.09.2019 um 20:25:
Hallo,
ist schon Komisch.
Der Einbau ist aber richtig und du hast es kontrolliert.
Gruß
Viktor
Geschrieben von Shorty1968 am 10.09.2019 um 11:47:
Ja das ist eigentlich immer wen ich ein Fehler finde ,das erste was ich mache.
Geschrieben von Viktor am 10.09.2019 um 20:51:
|
Zitat: Original von Shorty1968
Ja das ist eigentlich immer wen ich ein Fehler finde ,das erste was ich mache. |
|
|
Hallo,
hast du hier im Board mal die Suche benutzt.
Da gibt es schon einige Beitrage dazu.
FileInfo´s4ThreadAttachments
Vielleicht hilft das schon.
Gruß
Viktor
Geschrieben von Shorty1968 am 11.09.2019 um 14:28:
Hallo Viktor,
Ja vielen dank das hate geholfen nun geht es.
Geschrieben von Shorty1968 am 14.09.2019 um 18:18:
Sorry für Doppelpost ich habe ein Backup einspielen müssen und seit dem bekomme ich Folgenden Fehler.
code: |
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:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
|
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 255
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 256
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 258
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 259
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 208
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 209
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 211
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 212
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 255
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 256
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 258
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 259
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 208
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 209
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 211
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 212
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 270
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 272
Warning: Illegal string offset 'attachmentsize' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 273
|
|
Ich verstehe nicht wo der jetzt her kommt,ich habe doch nur ein Backup eingespielt und als ich das Backup erstellt habe war er nicht da.
Geschrieben von Viktor am 14.09.2019 um 21:21:
Hallo,
wie sehen denn die Zeilen aus wo der Fehler auftritt.
Vielleicht fehlt da wieder das ' in den Zeilen.
Gruß
Viktor
Geschrieben von Shorty1968 am 15.09.2019 um 00:10:
Hallo Viktor,
Nein die ' sind alle vorhandennehmen wir z.b. mal Folgenden Fehler.
Warning: Illegal string offset 'counter' in /var/www/vhosts/have-fun-community.de/httpdocs/thread.php on line 255
Die Zeile 255 sieht wie folgt aus.
$attachments['counter'] = $attachment['counter'];
Was ich nicht verstehe wie können diese fehler enstehen wenn als das Backup gemacht wurde alles ok war?
Geschrieben von Stine am 15.09.2019 um 16:35:
Hallo Shorty1968,
bitte die thread.php hier mit Dateianhang einfügen.
Geschrieben von Shorty1968 am 15.09.2019 um 17:25:
Hallo Stine
Sehr gerne danke
Geschrieben von Schrimm am 15.09.2019 um 20:19:
Hallo,
Das Problem liegt eher daran, dass du einen Index für eine normale Variable verwendest.
Sprich: Deine Variable "attachments" ist kein Array!
Geschrieben von Shorty1968 am 15.09.2019 um 21:15:
Hallo,
Verstehe ich leider nicht das sind die änderungen aus dem Hack und vor dem Backup hat alles gepasst,wer hat was geändert?
Geschrieben von Shorty1968 am 17.09.2019 um 16:19:
Kann niemand helfen?
Geschrieben von Schrimm am 17.09.2019 um 18:11:
Hallo,
Ich habe dir das Problem bereits genannt.
Es liegt an einer schlechten Modifizierung, die sowas macht:
php: |
1:
2:
|
$testarray = '';
$testarray['testindex'] = "Testtext"; |
|
statt:
php: |
1:
2:
|
$testarray = array();
$testarray['testindex'] = "Testtext"; |
|
Vor PHP 7.1 war PHP betreffend dieses Falles nachgiebiger und hat das Problem automatisch korrigiert.
Ab PHP 7.1 wird deine genannte Warnung ausgegeben und daher sollte es angepasst werden.
Geschrieben von Shorty1968 am 17.09.2019 um 18:37:
Das habe ich verstanden,was ich nicht verstehe ist das es zum Zeitpunkt des Backups unter php7.1 das Problem nicht gab und nach einspielen des Backups auch wider unter PHP7.1 ist es wie aus dem nichts da?
Geschrieben von Schrimm am 17.09.2019 um 18:39:
Hallo,
Da es eine Warnung ist, hast du sie eventuell davor unterdrückt?!
Geschrieben von Shorty1968 am 17.09.2019 um 18:51:
Hallo,
das könnte sein werde mich nun mal ran machen es zu beheben danke.
*EDIT*
Ich habe die Zeilen die angemekert wurden nun wie Folgt geändert.
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
|
$attachments = array();
$attachments['counter'] = $attachment['counter'];
$attachments = array();
$attachments['attachmentsize'] = formatFilesize($attachment['attachmentsize']);
$attachment = array();
$attachment['attachmentsize_byte'] = number_format($attachment['attachmentsize'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
$attachment = array();
$attachment['attachmenttraffic'] = formatFilesize($attachment['attachmentsize']*$attachments['counter']);
|
|
Nun werden aber die Datei an zeigen fehlerhaft dargestellt siehe anhang.
Geschrieben von Schrimm am 17.09.2019 um 19:29:
Hallo,
Die Behebung ist viel einfacher...
Deine Änderungen sind falsch und leert jedes Mal das Array.
Irgendwo kommt sowas vor:
php: |
1:
|
$attachments = ''; |
|
Nur diese eine Zeile ist zu verändern.
Geschrieben von Shorty1968 am 17.09.2019 um 19:47:
Perfekt vielen dank das war es,wie kommt man darauf?
Forensoftware: Burning Board 2.3.6, entwickelt von WoltLab® GmbH