icari

  • Messages: 88
array_flip()
« le 5 Mai 2013 à 16:10 »
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

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
Re: array_flip()
« Réponse #1, le 5 Mai 2013 à 16:12 »
Yay for the changes in r2088.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: array_flip()
« Réponse #2, le 5 Mai 2013 à 16:24 »
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... -_-

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
Re: array_flip()
« Réponse #3, le 5 Mai 2013 à 16:28 »
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.

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: array_flip()
« Réponse #4, le 5 Mai 2013 à 16:43 »
Citation de Arantor le 5 Mai 2013 à 16:28
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.
Citation
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... -_-
Citation
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.
Citation
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...!

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
Re: array_flip()
« Réponse #5, le 5 Mai 2013 à 17:02 »
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.

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: array_flip()
« Réponse #6, le 5 Mai 2013 à 17:11 »
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...