Armory bug

Discussions, suggestions and error reports for the forums and website.
Post Reply
User avatar
arnis5
Banned
Posts: 474
Joined: 10 May 2014 02:37
Location: THE DEPTHS OF HELL

Armory bug

#1 » Post by arnis5 » 16 Mar 2016 14:10

There is a bug on armory when you are checking Raid ID details or someone's talents you can see following msg:
[phpBB Debug] PHP Notice: in file /var/www/armory/includes/classes/class.character.php on line 2968: Undefined index: playerBytes
[phpBB Debug] PHP Notice: in file /var/www/armory/includes/classes/class.character.php on line 2969: Undefined index: playerBytes2
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Solution:
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);

or
// Report all errors, except notices
error_reporting(E_ALL ^ E_NOTICE);
Arnis - Marksmanship Hunter PVE/PVP
Predatoor - Death Knight Hybrid Tank/Blood Dps PVE
Restoration - Shaman Resto/Ele PVE
Arniscat - Druid Feral Tank/Restoration PVE
Arnisrocks - Paladin Protection/Retribution PVE
Arnislock - Warlock Demonology PVE
Stanimalo - Rogue Combat PVE
Mazdean - Priest Shadow/Holy PVE
Pecaros - Warrior Protection/Fury PVE
Arniskhanna - Mage Arcane PVE
The Demonic Lord!
If you're going through hell, keep going.

User avatar
Naxp
Posts: 146
Joined: 04 Aug 2015 17:49

Re: Armory bug

#2 » Post by Naxp » 16 Mar 2016 15:04

or just make them pre-defined as a value counted as null :p

ur second solution may give hidden issues in the future, if vulnerables appear, staff will have less chance to even know about it ^^

User avatar
arnis5
Banned
Posts: 474
Joined: 10 May 2014 02:37
Location: THE DEPTHS OF HELL

Re: Armory bug

#3 » Post by arnis5 » 16 Mar 2016 15:20

Naxp wrote:or just make them pre-defined as a value counted as null :p

ur second solution may give hidden issues in the future, if vulnerables appear, staff will have less chance to even know about it ^^
Yes this can work aswell:
error_reporting(0);
But might casue some problems like geting blank pages after posting something Image
Arnis - Marksmanship Hunter PVE/PVP
Predatoor - Death Knight Hybrid Tank/Blood Dps PVE
Restoration - Shaman Resto/Ele PVE
Arniscat - Druid Feral Tank/Restoration PVE
Arnisrocks - Paladin Protection/Retribution PVE
Arnislock - Warlock Demonology PVE
Stanimalo - Rogue Combat PVE
Mazdean - Priest Shadow/Holy PVE
Pecaros - Warrior Protection/Fury PVE
Arniskhanna - Mage Arcane PVE
The Demonic Lord!
If you're going through hell, keep going.

User avatar
Naxp
Posts: 146
Joined: 04 Aug 2015 17:49

Re: Armory bug

#4 » Post by Naxp » 16 Mar 2016 19:01

arnis5 wrote:
Naxp wrote:or just make them pre-defined as a value counted as null :p

ur second solution may give hidden issues in the future, if vulnerables appear, staff will have less chance to even know about it ^^
Yes this can work aswell:
error_reporting(0);
But might casue some problems like geting blank pages after posting something Image
hmm still only good for temponarly use.. such as previews..

this index undefined is caused by an variable who comes inside without being predefined

I'm not sure about Etros code, but those two below is the most common solutions.

Sol.1
[hide]

Code: Select all


//Predefining the variable @start of section using a NULL expression such as empty or simply Null if SQL
$playerBytes = ""
[/hide]

Sol.2
[hide]

Code: Select all


//Going from behind, thats how we like it
if (isset($_POST['buttonProceed'])) {

//Section code goes here
}
[/hide]

User avatar
Etro
Honorary Member
Posts: 2558
Joined: 14 Oct 2012 08:24
Location: Behind ccrs

Re: Armory bug

#5 » Post by Etro » 16 Mar 2016 19:19

Naxp wrote:I'm not sure about Etros code, but those two below is the most common solutions.
Hmm?

Image
"With life, no matter what you do, you are all in. This is going to kill you. Might as well play the most magnificent game you can while you're waiting, because... Do you have anything better to do? Really?"

User avatar
Nyeriah

Re: Armory bug

#6 » Post by Nyeriah » 16 Mar 2016 19:30

I have notified Nuko about it, but it's probably best to post these errors at the armory thread since he's subscribed to it, so he'll get an email notification about it when you post it there.

http://www.truewow.org/forum/viewtopic. ... 23#p187323

User avatar
Naxp
Posts: 146
Joined: 04 Aug 2015 17:49

Re: Armory bug

#7 » Post by Naxp » 16 Mar 2016 21:12

Etro wrote:
Naxp wrote:I'm not sure about Etros code, but those two below is the most common solutions.
Hmm?

Image
Sorry, meant Nok

User avatar
Nuko
Former Staff
Posts: 540
Joined: 27 Aug 2010 21:47
Location: United Kingdom

Re: Armory bug

#8 » Post by Nuko » 27 Mar 2016 17:10

A very belated LOL at Etros piccy :P

I like how it so naturally draws ones attention to the subject at hand.

Anyway, should be fixed, the error was originating from trying to extract the playerBytes and playerBytes2 fields from an SQL query result but the fields no longer exist due to a recent update. I've updated the field names so all should be fine.

The undefined index error comes from attempting to read a value from an associative array (ie the query result) by something like

Code: Select all


$this->playerBytes = $queryRow['playerBytes'];
but since the playerBytes field no-longer exists, the $queryRow array no longer has an element with index "playerBytes" assigned to it when the query result is returned. Hence PHP gets rather offended and feels the need to complain via a strongly worded warning output.
Nuko - In the event of malfunction, please insert tea.
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

User avatar
Naxp
Posts: 146
Joined: 04 Aug 2015 17:49

Re: Armory bug

#9 » Post by Naxp » 27 Mar 2016 20:13

Nuko wrote:A very belated LOL at Etros piccy :P

I like how it so naturally draws ones attention to the subject at hand.

Anyway, should be fixed, the error was originating from trying to extract the playerBytes and playerBytes2 fields from an SQL query result but the fields no longer exist due to a recent update. I've updated the field names so all should be fine.

The undefined index error comes from attempting to read a value from an associative array (ie the query result) by something like

Code: Select all


$this->playerBytes = $queryRow['playerBytes'];
but since the playerBytes field no-longer exists, the $queryRow array no longer has an element with index "playerBytes" assigned to it when the query result is returned. Hence PHP gets rather offended and feels the need to complain via a strongly worded warning output.
Ahh, clean & simple ^^

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests