Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: icari on May 5th, 2013, 04:10 PM
-
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /wedge/Sources/Subs-Cache.php on line 668
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /wedge/Sources/Subs-Cache.php on line 668
in some boards the error above shows up
-
Yay for the changes in r2088.
-
Well, it's no biggie...
(1) if an error shows up on all pages, THERE'S A STRONG CHANCE I'VE NOTICED IT MYSELF... And that I'm working on fixing it. (Which I did.)
(2) if it's a "warning", rather than a crash, it's likely that it's due to wedge.org's PHP having Strict mode enabled, while my local install has it disabled.
(3) I worked really hard on that release... Made a small mistake that wasn't visible in non-strict mode, it's really no reason for the harsh comment, Pete... -_-
-
Aside from the fact that I was getting it myself on r2088 locally, it just seemed like it hadn't been tested prior to deployment here :/ Easiest way to solve that is just to have strict mode enabled locally and be done with it.
That and the fact that I now have to re-review all of my 46 pending files for changes that might have emerged from r2088.
-
Aside from the fact that I was getting it myself on r2088 locally,
Odd...
Anyway, the fix is to look for we::$cache['global'] = true and change to = 'global'... Same for 'local'.
It was a 'quick hack' I made yesterday, so I'm very surprised that I didn't get any errors myself..? I guess we'll never know, ah ah.it just seemed like it hadn't been tested prior to deployment here :/
Well, considering how I've worked on this shit from morning to late evening for the last three days, and the last rewrite was tested for many hours, I dare say the contrary... -_-Easiest way to solve that is just to have strict mode enabled locally and be done with it.
I don't know how to enable it, ah ah...
I'll google it.That and the fact that I now have to re-review all of my 46 pending files for changes that might have emerged from r2088.
Just do a quick search on we::$user['is_ in your code, and replace with we::$is[' -- should account for 90% of the changes. Also, we::$browser['is_ to we::$browser['. The majority of what I did is there... This should save you from any conflicts, but really, outside of Wess, I didn't have to change much...!
-
There are various things that are 'strict mode' between them.
But the thing is, the error given isn't one that is an E_STRICT type error, it is where array_flip is being passed something it can't handle, it can't handle non-scalar array items.
-
Okay, looks like I had a few errors in my log -- I just didn't see them because every time I tested, I didn't get anything. It just evades me... Not worth discussing any longer. Bug fixed, will be in my next commit, let's talk about something else...