« first day (1496 days earlier)      last day (3462 days later) » 

9:05 PM
argh
Safe Casting Functions vote currently at 3:4
 
really wondering if I should merge that myself...
 
I mean it was effectively 3:4 before, just Derick hadn't voted yet
 
@FlorianMargaine Yes, you should… it's a trivial patch…
 
is there a way we can execute that same function using PDO, i'm new to using PDO
 
@bwoebi k. I'll try :)
 
9:20 PM
Fuck you php (and hhvm)
 
@PeeHaa ? PHP 5.6 looks like what you want?
 
@PeeHaa bug
 
trying to implement the same function using PDO
 
@LeviMorrison yeh
 
…then I don't see what's wrong?
 
9:24 PM
hm
 
I'm not on 5.6 for this project :(
 
@PeeHaa This is for parameterized queries, yes?
 
florian@fedora php-src$ git push phpnet PHP-5.5
fatal: unable to access 'http://git.php.net/repository/php-src.git/': The requested URL returned error: 403
florian@fedora php-src$ cat .git/config | grep phpnet -A4
[remote "phpnet"]
        url = git.php.net/repository/php-src.git
        fetch = +refs/heads/*:refs/remotes/phpnet/*
florian@fedora php-src$
 
Yes
 
does this seem normal to anyone?
 
9:25 PM
Then you have to make sure the count > 1 anyway.
You can't just do IN() and have it work; similar issues happen with other usages too.
 
True, still a wtf. Don't people test shit like that
 
@PeeHaa if you feel like it, bugs.php.net :P
or you can PR a new test case
 
Why? It is already fixed :P
 
;-)
 
9:26 PM
you could ask for it to be backported in 5.5 though
 
@PeeHaa By the way, I've promoted this answer so many times but it's exactly what you want (except add error checking):
35
A: PHP/MYSQL using an array in WHERE clause

Levi MorrisonIn SQL the IN() operator is used to check if a value exists in an array. The code below uses prepared statements for MySQLi or PDO to help mitigate SQL injection attacks. The variable $ids is assumed to contain at least one value. Error checking is omitted for brevity; you need to check for the ...

(Although, it doesn't do PHP <5.6 for MySQLi, actually)
 
@LeviMorrison That is exactly what I have always been using ;)
 
> The variable $ids is assumed to contain at least one value.
Your fault for not reading it then.
 
My WTF was moar about the behavior of the function :)
 
9:30 PM
Aaaaaaaaaand opcache crashes apache again :|
 
@FlorianMargaine You can't push to git.php.net it needs to be git.php.net... or git@git.php.net...
 
@ircmaxell $wp_the_query oh, pure genius…
 
@ircmaxell I'm very sorry, but that really doesn't surprise me any more
 
@salathe ah, thanks
 
9:33 PM
:P
 
heh
sounds like I don't have actual karma
remote: Welcome fmargaine.
remote: You have insufficient Karma!
remote: I'm sorry, I cannot allow you to write to
remote:     php-src.git/sapi/fpm/fpm/fpm_conf.c
remote: Have a nice day.
good :D
I can bother people to merge in my PRs
 
@ircmaxell I'm reading that file, and substituting "wp" with "whoopee" (in a high-pitched voice).
4
 
Good morning.
 
@FlorianMargaine and I'm missing SVNROOT karma. Can't give you needed karma :-(
 
Good morning to you @ChrisBaker
 
9:35 PM
@bwoebi it's ok, merge my PRs instead :P
 
I modified the contents to note the versions it applies to, reset the down votes and +1: php.net/manual/en/function.array-fill.php#115793
I think that's the first time I've done that.
 
@bwoebi I only asked karma to assign bugs to myself, never asked one to get commit access
so I'm not surprised
 
@salathe They're unsetting the loop variable at the end for every foreach, presumably to clean up the global scope (which they fill with bullshit anyway). Is there any performance benefit to unsetting after a foreach like that?
 
@LeviMorrison \o/
 
lol, just put the Konami code into something I'm deploying :-P
 
9:41 PM
The note should be short lived, because someone should update the docs to remove the exceptions/warning section and note the change in the changelog.
But sometimes that takes a while, so I did the above actions instead ^^
 
@LeviMorrison Someone whose name starts with L? :)
 
I did not discover, nor fix, the bug. I may update it but have no obligation^^
 
Great, thanks for volunteering. :D
 
dam, this code is a rats nest
the original vulnerability I thought I found turned out to be ok, but it led me to another
 
@ircmaxell And now you wonder how deep the rabbit hole goes :)
 
9:46 PM
this weekend I'll make the injection happen :-P
I know the query, line and file
just not the input path
 
also: holy crap I need a drink
 
so
now that I know I don't have karma...
I'll have to find someone to bother whenever I have a PR to get merged
 
@FlorianMargaine if you mention that fact, and link to your PRs, in a mail to the internals list... you might magically find yourself with commit karma :)
 
or someone to commit for you
 
@salathe hahaha
@ircmaxell tried that... didn't work
I'll try to email Remi Collet directly... he seems to be the only one who takes care of fpm
 
By the way, fixed in bugs.php.net/bug.php?id=49824
And thanks, salathe ^^
 
Teamwork. :)
 
shouldn't this be backported to 5.5?
 
10:02 PM
No.
(at least in my opinion)
 
because bc break?
 
It can be super-annoying when teeny, tiny changes happen in bugfix releases.
 
I wish patch releases were for security fixes and regressions only.
General bugfixes go into next minor.
 
10:20 PM
Haha, PeeHaa shit on the SO hat party. Good show!
 
;-)
 
anyone using gpg?
can you tell me if you see my public key if searching florian at margaine dot com?
 
@ChrisBaker I'm still sad though they "revised" my initial post :)
 
Using the term "rep whore" is now apparently slut shaming, and therefore banned from polite society. Good to know, I guess.
 
:P
 
10:33 PM
So, what verb do I use now that can't go "rep whoring"?
 
"The act of acquiring rep in a way that is counter productive to the community" is still allowed I guess
 
repfarming
 
but but but think of the farmers!
 
There's always an entity opposing a certain statement.
 
Ain't that the truth
 
10:42 PM
@PeeHaa Nice "liar paradox" there :P
 
:)
 
@LeviMorrison You are acquiring rep using a different set of morals than what society considers "normal" because you're a free spirit and think social expectations are an antiquated idea. Not that there's anything wrong with that, etc etc.
 
…or I just want the rep for dupe-hammer.
 
Guys, I'm tired and i'm in a big sh*t. Can someone help me modify a small and simple function ? It realy gave me headaches for few hours
 
Shit you are in
 
10:46 PM
The FDA recommends people limit their exposure to shit to 30 minutes a day, and only when using 30 SPF or higher.
Errr, that's sunshine, actually. I think you're just supposed to avoid shit completely. Fact checking now.
 
I am highly contaminated then
 
Okay. Gonna post your function, or were you waiting for us to exhaust ourselves with witty poop jokes?
I'm already pretty tired.
 
Can I post the link to my question here ?
 
I'm afraid so
 
0
Q: Non-empty categories and their subcategories

yodaRight now, I use the below function to create a dropdown menu, which work flawlessly compared to primitive in-loop MySQL queries used in the past. How can this function be optimized/modified to return only non-empty categories and their subcategories? Category 1 (omitted) Category 2 |___Subc...

Thank you comrades
 
10:50 PM
You're using one query to get that data, ya?
 
Yes and I wish to avoid another SELECT DISTINCT query
 
Someone might disagree with me, but IMO it would be more simple to loop the data and sort it into a structured data array, with the categories and children grouped. Then take the resulting loop and loop THAT to generate the HTML.
Then you could check if (count($thisParent['children']) < 1) continue; as you draw the HTML.
 
I'll try your solution in a sec
 
11:05 PM
@yoda Sort of like this: codepad.viper-7.com/t5ianC
So there, I'm looping the data to make a parent->child structure, which I can then use for whatever... including making HTML.
No recursion there, either.
Gotta run, good luck and good night 11
 
Thank you. I've just splitted the array into cats and subcats, then i'll try to make a check the association with array_key_exists or in_array
Ty, good night !
 
later @ChrisBaker, @yoda
 

« first day (1496 days earlier)      last day (3462 days later) »