« first day (3623 days earlier)      last day (1311 days later) » 

2:24 AM
Cannot skip arguments when extended debug is enabled ・ Scripting Engine problem ・ #80109
 
 
4 hours later…
Wes
6:03 AM
\o
 
o/
 
Hey guys!
I am having a terrible time with a Laravel bug, can anyone help me out?
 
Wes
@mega6382 i am finishing the new one this weekend
sales were never high :B i probably should've pushed them more :B
 
6:55 AM
@Jared What is the issue?
 
object with __invoke method is considered callable ・ Documentation problem ・ #80110
 
7:21 AM
@Dharman nope, oversight
 
7:33 AM
@bwoebi I'm seeing a new use-after-free, this one introduced by the recursive zend_generator_dtor_storage call...
Getting a standalone reproducer for this will be tough though
 
is this being too smart? bugs.php.net/bug.php?id=80108&thanks=1
 
morns
@Alesana how does that even work?
@Wes cool
 
7:53 AM
@Tpojka no.
 
@Wes well, teespring was quite a hassle for me to use, their shipping system for my country sucked, I had to report multiple times and they had to send it out three times none of which delivered, so I finally got a refund and then had it delivered to my brother in France.
you should look for a better partner site.
 
Wes
:(
 
@DaveRandom You had lot of luck as a kid. Or less requests than me.
 
Wes
for a starter it would be great if they didn't brand their bags @mega6382 the pretty shiny bag with teespring printed all over is a easy target of thieves
also it's a t-shirt so you can just put it in your pocket without anyone noticing
do you know if they shipped from europe or us? they print in both continents. surely your t-shirt had to travel through several countries
that's the problem, not teespring itself, i believe
too long a journey
easy to make it disappear
 
@NikiC In what format do you get these reports? Cannot see them
I assume you'll have a big testcase though? Feel free to share the non-reduced version
 
8:12 AM
The problem is that it only reproduces in the fuzzing environment, which will perform a bailout after executing 1000 opcodes
Which happens on line 17. I haven't been able to get it to reproduce with a manually inserted fatal error though
Thus also the various odd bits in the test case, removing something means that the bailout happens in a different place ^^
 
8:25 AM
I can reproduce the issue
$i = 0;
do {
    foreach ($gens as $g) {
        ++$i == 4 && foo();
        var_dump($g->current());
        $g->next();
    }
}
while ($gens[0]->valid());
Added a fatal error after 4 iterations, then it happens @NikiC
function gen() {
    yield 0;
    yield from gen();
}
function bar($gen) {
    yield from $gen;
}
$gen=gen();
$gens[]=bar($gen);
$gens[]=bar($gen);

$gens[0]->next();
$gens[1]->next();
$gens[0]->valid();
$gens[0]->next();
Unrolled/cleaned up variant
 
yay
heh, and the fact that those generates are in an array seems to be relevant...
The ->valid call doesn't seem necessary
 
Right
true
It is relevant because that way the undeterministic destructor call order may strike again
somehow
Ah, I see, forgot to promote the children of the root to a root when their parent is freed when destructing
(i.e. set child->node.parent to NULL)
if there are no further leaf nodes referencing it
$gen=gen();
$a = bar($gen);
$b = bar($gen);
$a->next();
$b->next();
$a->next();

unset($gen);
unset($a);
unset($b);
Is more explicit and will fail too
using the array causes the $gen elements to be destroyed in forward order, while symtable/object destroy is in reverse order…
that's why it makes a difference
The main issue is that parent_becomes_leaf is only true, when the node has 1 child… But there may be more children, which just do not yet have acquired a reference to it
 
9:27 AM
Hello

public function storeBlog(Request $request)
{
if ($request->hasFile('image') && $request->file('photo')->isValid()) {
$image = $request->file('image');

Http::attach('attachment', file_get_contents($image), 'image.jpg')
->post('example.com/v1/blog/store', $request->all());
} else {
Http::post('http://example.com/v1/blog/store', $request->all());
}
}

I am using this code to send an attachment in laravel to API endpoint But i want to add attachment to an API endpoint only if there is a FILE in request
 
10:03 AM
@Wes it was from US
@Wes yeah, that makes sense
 
@MateKocsis I think I see what's going wrong with your compression issue
We're overflowing the max packet size when adding 4 bytes for the header
 
10:27 AM
Morning
@DaveRandom =)
 
@NikiC Wow! That's awesome :) I also suspected some overflow issue, but I just couldn't find the cause.
 
@MateKocsis As usual, there seem to be more issues than that...
There's two different sequence numbers involved for packets and compressed packets, and probably something is getting mixed up now...
 
10:52 AM
@NikiC should I commit the test with the XFAIL section? To which branches?
 
11:02 AM
Also just found bugs.php.net/bug.php?id=68544 from @bwoebi ^^
Though the situation there is a bit different
 
cmb
Does that work on Linux without compression? It fails on Windows in that case.
 
@cmb which one?
 
cmb
only checked Máté's ticket so far
 
@cmb yeah that one works without compression
 
I have installed VC++ and build PHP. It runs, but I don't have a clue how to enable mysqli extension. How can I do that?
Never mind I found my mistake
 
12:02 PM
@MateKocsis Sorry, Sara was the one taking care of the release this week. Ping both of us next time :)
 
I mean Sara did the release at 21:00CEST~ which is pretty late lol
 
12:23 PM
@GabrielCaruso No problem, I could merge the PR in question not long after I pinged you, that's why I didn't ping Sara afterwards :)
 
@Girgias She lives in the US, that's why. Most of the RMs live in Europe, but when she handles the release, that happens :D
 
I know that :p but yeah surprising how it seems most core-devs live in Europe
 
cmb
@Girgias way state that we tag on Tuesday; that is a timeframe of almost 48h ;)
 
True, never saw a tag at -12UTC tho :p
 
We need a contributor from Hawaii
 
12:28 PM
Yesterday I found out that Nikita is Russian. I though he was German
@Tiffany We have Alex from Zambia in PHP 8.0, the first one from Africa AFAIK
 
Also @cmb I'm cooking up the warning to error PR for COM hopefully should be ready within 30min :)
@GabrielCaruso That bit I knew, however most people are very confused about the fact that I'm German :')
 
@GabrielCaruso huh, that's pretty neat
 
@GabrielCaruso I thought @NikiC was an advanced super computer... it's going to be hard to change my mind otherwise.
 
lol
 
@Girgias Wat? Aren't you from UK? Jez, I'm very bad guessing nationalities
Derick is Dutch, that was the oddest for me
 
12:31 PM
@GabrielCaruso Half British half German :) so you're not wrong per say :p
 
I just go with European, much easier to explain than: I'm Dutch and British, but not English, (Northern) Irish, Scottish or Welsh.
 
@StatikStasis Until I saw a talk from him for the first time, I had similar thoughts
 
@Derick Don't you get people saying that's too "vague"? Because everytime I used that they told me that
 
Life is complicated, suck it up snowflakes.
 
@GabrielCaruso Holographic technology has came a long way.
 
12:32 PM
I'm German, English (supposedly), Irish, and I forget what else... but most Americans are mutts anyway
 
I have a similar approach to "So, you are from Brazil? Do you speak Brazilian?"

Yes, because explaining that I speak Portuguese and I'm not from Portugal takes to much time
 
I'm yorkshire.... like a pudding >.<
 
@Tiffany I think Americans are too lenient with this. I don't think you should call yourself something unless you're either a first level immigrant, or hold that passport.
 
@StatikStasis Oh, that's true, never tough about that possibility
 
@StatikStasis Fockin Hell
 
12:34 PM
@MarkR Bloated hot air in a batter coating? ;-)
 
We're doomed
 
@Derick Something like that.
 
@Derick yeah, I should've said there's apparently those genetics in my family history but harder to explain :P or "German blood, English blood, Irish blood..."
 
If you have German blood, who have you been stealing that from? :-)
 
My parents
 
12:36 PM
@Tiffany By that logic I'm also Irish and Czech (or Slovak)
 
You don't even have to go that far back to find all the people that lived than are all the parents of the people that live now.
 
Also Cherokee blood and another tribe, but I forget which, maternal side
I'm supposedly either 12.5% Native American or 25%, I dunno which
 
I should do a DNA test sometime
Oh, and I'm Lincoln's sixteenth cousin
 
@GabrielCaruso I was always wondering about that :D How did you btw? :)
 
12:39 PM
@Tiffany That article argues that they aren't that useful too btw
 
I am fixing a bug in mysqli. I need to come up with a new error message. The old one was "Invalid characterset or character set not supported" and the one I came up with is "Invalid character set name was provided". What do you think?
 
@Derick funny that I get an ancestry advert
 
@MateKocsis An interview for PHPStorm, let mi found the link
 
uBlock Origin — no adds.
 
@GabrielCaruso And then an interesting fact is PHP's first 4 top committers have Russian origins at least :)
 
@Tiffany if its 25% then one of your grandparents must be full native.
 
@cmb You are German as well, right?
 
@mega6382 Or two of your great grand parents ;-)
 
:)
 
cmb
@GabrielCaruso yes
 
12:43 PM
but saying you're 25% something is pretty meaningless too, as there is so little genetic variation between people.
you're going to be 99% human, and then a little specialisation
 
Speak for yourself. Inferior fleshy organic.
 
That's why I love OSS, Americans, using Russian software, supported by Germans, with Brazilians trying to care of the Releases, if a Dutch messing around with some extensions, and Europeans reporting and fixing bugs
 
@GabrielCaruso I thought that @cmb is British for a long time, because he always uses sophisticated expressions :) :)
 
Pff, CO2 flatulating water sack.
 
12:46 PM
@mega6382 shit
 
@mega6382 that's where it's confusing, my mom claimed my maternal grandpa was full-blooded, but they weren't sure, someone else on that side of the family said he was only half. I used to believe everything my mom said until well after she had passed and I learned that some of the things she said were fantasies... so I'm either 12.5% or 25%
 
@Tiffany interesting
 
could have been my mom wanted to believe she was half Native American cause she was obsessed with the culture
at least, as much as a white person could be obsessed with something without being exposed to it
 
@mega6382 Hahhaa never saw that one, funny
 
user1804599
I always tell people I’m from Mindyourowndamnbusinessstan.
 
user1804599
12:53 PM
Works great. They even leave me alone for the rest of the evening.
 
@rightfold Is that the city or the country? /jk
 
it's like a primary school thing in America - discussing which countries your ancestors are from, about the only reason I know... at least it was when I was in elementary school
 
@GabrielCaruso The people ask that often enough for Luxembourg…
 
New York City or New York state
 
@Tiffany at least NYC has City in its official name … for Luxembourg "City", City isn't even part of the name
 
@bwoebi I'm actually not sure if it does, I think people just add "city" to clarify
 
@bwoebi bourg?
 
user1804599
Would be fun to say I’m from Poortugaal
 
@rightfold Not sure if that's worse than " Hendrik-Ido-Oostendam-Schildmanskinderen-Groot-en-Klein-Sandelingen-Ambacht" :P
 
nobody calls it that though
 
user1804599
1:00 PM
I was born in a place that no longer exists, which is also fun.
 
I am classy like that though
 
Richtugal! :D
 
@bwoebi ah, it does have "City" in the name - en.wikipedia.org/wiki/New_York_City
 
@Derick It's just interesting to know your family's origin store... or as much as possible. On my mom's side we've traced one side back to an Irish 12 year old who was a stow away on a ship. Last name was O'Canada. He ended up going up into Canada at first and dropped the "O" because he thought he would fit in better with the last name Canada.
My people are descended from thieves and whores... (Frasier reference) //cc @DaveRandom
 
@bwoebi In Brazil we have the same problem for São Paulo, Rio de Janeiro and some others. They are both cities and states :D
 
1:11 PM
ugh
nobody happens to know how to force mysql not to use ssl?
 
@NikiC No, but didn't --skip-ssl work? dev.mysql.com/doc/refman/5.7/en/…
 
@MateKocsis Preferably something that only needs changes on the PHP side
All I want is a workable wireshark dump and it's taking me an unreasonable amount of time to get that
 
Just intercept the SSL keys
should be a doddle with openssl
Let me see how I did that ...
 
I have accidentally created my branch from another feature branch and now how can I make it to be created from master and retain all the commits
 
@NikiC Uh :/ I wouldn't have thought that the issue is this complex :/ Please just ignore it if it's way too time consuming.
 
1:21 PM
@Exception git rebase --onto
 
@Exception you can either cherry-pick the commits (preferably if there's not too many of them), or rebase
 
I have 9 commits
 
git rebase --onto OtherBranch HEAD~9 then I believe :)
also have git rebase --abort handy if something seems weird :)
but honestly with 9 commits, just cherry pick them in order, it feels annoying, but probably faster than in the end
 
IIRC correctly the correct syntax fir git rebase --onto is
git rebase --onto worng-feature-branch-base-off new-branch-base-off
I've used this way too much
Nope got the other wrong
 
@beberlei can you please share correct order.
 
1:29 PM
@Exception dont know its "git cherry-pick $sha1" 9 times, based on git log output
 
morning
Does that make sense that any return statement in finally overrides return from try block and why?
function bar() {
    try {
        return new DateTime('now');
    } catch (Throwable $e) {

    } finally {
        return new DateTime('-1 week');
    }
}
Consider this example, it returns -1 week
Since there is no exception I'd expect finally block to just execute any additional statements after setting the return value for function call but overriding it IMO should trigger an error
Otherwise, I consider it confusing
 
So try block doesn't need to be parsed/read at all if finally contains return?
 
No the thing is it overrides return value which was already set
Since this was the only statement in try block
 
It's too heavy to override return imho.
 
@Tpojka What do you mean?
If I'd replace new DateTime() with for instance INSERT INTO SQL query execution then it'd be invoked twice with for eg. only the latter id being returned by bar() function
Completely silently with no warning.
 
1:47 PM
that works as I would expect it to work. any other behavior would be weird
(ie. ignoring the return from the finally block would be strange)
 
@brzuchal return should stop execution anywhere was my thought.
 
No, finally needs to run. I consider this correct behaviour.
 
@Derick I agree that finally needs to run but why is it allowed to override return value, what's the reasoning?
 
@Exception I tend to use a GUI for this type of stuff because I'm constantly afraid of screwing my git history up and most git GUI programs offer ways to protect you from making mistakes. I'm more familiar with Git Kraken (free for open source), but Sourcetree is another
 
i am using git extension
 
1:54 PM
Sourcetree and Git Kraken are different
However, if you're already pretty familiar with Git on CLI, a GUI program will be a hindrance for you
 
@brzuchal Questioning myself now. Didn't expect this after return.
 
I do almost all basic and some intermediate stuff in CLI, but anything I consider advanced (cherry-picking), I'll use a GUI to make sure I'm doing it correctly
 
@brzuchal If there isn't already, there should be a phpstan rule to prevent this.
 
2:24 PM
Because of course someone would.. reddit.com/r/PHP/comments/itw5nt/…
 
hi
I am getting error in compose while updating in my laravel project
In LaravelLocalization.php line 1040:

Class 'Illuminate\Support\Env' not found
 
2:40 PM
> If I may say so, the protocol is pretty ridiculous.
:-D
I'll totally admit that I had my fair share of WTFs while implementing amphp/mysql
And I guess amphp/mysql has that same bug :-D
I'm basically just sending one uncompressed frame when the size would be exceeded
instead of splitting
which seems much simpler to me to do as well
 
@bwoebi That's a different issue
We also send uncompressed when compressed size is not smaller
 
@NikiC It's very kind from you, thanks for going through this insanity :)
 
I am getting while composer update in laravel 5.5 project
error In LaravelLocalization.php line 1040:

Class 'Illuminate\Support\Env' not found
 
@NikiC so what exactly is the issue?
 
2:50 PM
@bwoebi The \substr(\pack("V", $len), 0, 3)
For the case where $len > 0xfffff
 
@YogendraTomar somethings gone wrong. But not many people here do Laravel, so you'd be better off asking on a Laravel support forum.
 
@NikiC no, for the case where $len + 3 bytes header > 0xffffff
 
@bwoebi Depends on which $len we're talking about :)
 
I have set up PHP environment today and I have to tell you: it's amazing to be able to make some changes in PHP source code, quickly compile it and see how it works.
 
@NikiC and no, you are still using compression when compressed length > payload length - at least I find no such check in code
 
3:02 PM
That switched between compressed or uncompressed payload
 
@YogendraTomar see github.com/mcamara/laravel-localization/issues/748 for problem & workaround
 
Ah, I see, before it was to_be_sent + header_length
now it's just to_be_sent
@NikiC shouldn't it be enough to just change that?
 
@bwoebi No, as you do need to send the packet header as par of the compressed packet
Given how the protocol works, I don't think it's avoidable to split each large packet into two if compression is enabled
Because it requires that each packet without the 4 byte header is exactly 0xffffff long, and once you add the header it forces you to split the compressed packet
 
What piece of PHP code would generate an ArrayItem (https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/Node/Expr/ArrayItem.php) and how would you assign something to an array item in the symbol table?
I'm looking at
`list(, $queryString) = explode('?', $_SERVER['REQUEST_URI']);`
but I can't see how its different than a normal assignment to $queryString variable.
 
@NikiC that's only the case for the payload of the compressed data, not for the compressed packets itself
the compression is basically just a layer on top of the existing protocol
which is just concatenating frames
 
3:11 PM
Yes, but not sure what you're trying to get at
 
let's say, you have an incompressible payload $payload of 2^24-1 bytes, you can then send this as 0xffffff (payload length), 00 (sequence id), 0x000000 (it's uncompressed), $payload
as a single packet
ah
wait…
 
@bwoebi Ah, now I get what you mean. This doesn't work for the case where you do compress though.
 
@NikiC yes, but you can just not compress these individual payloads
 
@bwoebi That would basically kill your compression though
That would mean that you don't compress exactly your largest packets ^^
 
@NikiC You can switch compressed and uncompressed packets within the stream
so, send uncompressed frame if not compressible
otherwise send compressed
 
3:17 PM
@bwoebi I think we're talking about different things here
 
maybe
 
The problem really isn't the case where you can't compress. The problem is where your original packet is large and you do compress
And that's a case that I think amp doesn't handle correctly as well
 
@NikiC yeah, you're right, I was confusing the various headers
 
semi-related: bugs.php.net/bug.php?id=80043 could this be closed since the built-in web server won't ever be intended to use in production?
 
3:24 PM
@mega6382 I just went into my "Activity Monitor" then found a process called "coreaudiod" and closed it
Just followed some troubleshoot guide I found online :p
 
cmb
@Tiffany well, that bug could be fixed nonetheless
@Tiffany oh, "Smallest PHP 7.4 container using multi-threaded PHP Built-in web server ". @JoeWatkins might not like that. And I still think we should document PHP_CLI_SERVER_WORKERS. :)
 
3:44 PM
I need to work on my to-do list for documentation, and I should add helping you remove PHP 5 to that list
damn, Sobak put a lot of effort into this
 
cmb
@Tiffany thanks. Biggest hurdle is moving the archived docs to doc.php.net/archives. Has anybody access to that?
 
I need to catch up on updating the French doc :(
BTW How can I set-up a GitHub repo for the French translation?
 
@cmb Maybe write systems@ to request access?
 
@Alesana no, i menat how did restarting the system not restart all the services, how would that even work?
 
cmb
@NikiC ah, the "black hole" – I gave it try :)
 
4:49 PM
@mega6382 Oh duh, I realized like 5 seconds after typing that, that you might've meant about the restarting. I'm not sure to be honest, it doesn't make much sense. The troubleshoot thing listed it after the "restart your computer" step and in the Activity Monitor showed the CPU time as something pretty high after restarting as well which I think means it used the CPU for that amount of time since it was started
 
5:01 PM
Hi, anyone has used composer to require npm packages?
 
but...why?
 
PHP SplDoublyLinkedList::offsetUnset UAF Sandbox Escape ・ *General Issues ・ #80111
 
Do Q n A testers annoy you?
 
@Jeeves I am not surprised.
 
@cmb yeah I was wrong, better document it with big red boxes saying it's supported to the same degree as the built-in server - unsupported for production loads ...
someone was bound to find it I guess ... you just can't keep secrets in php world ...
 
5:14 PM
@Alesana interesting
 
The thing will segfault sometimes if you don't print any output, btw. It really is NOT fit for production...
 
we know
 
@SalOrozco only when they don't report issues........
 
like dan said it's got known issues that would be regarded sec issues ...
that should make it a non starter for anyone ... anyone with a brain anyway ...
can we make a brain a requirement ?
5
 
I'm tempted to look into trying to make a thing that checks "can this box be reached from the open internet", and then stop the code from working.....would be useful for imagick also.
 
5:52 PM
@JoeWatkins maybe check packagist to see if there is already a package for that :D
 
6:22 PM
Is there a consensus on PHP filenames? I don't see one in PSR.
Specifically for a PHP file containing a function only; no class.
 
@StatikStasis usually its to have the same name for the file as the class, so go for the same name for file as the function if just one, or something that best describes the collection if multiple.
 
@StatikStasis functions.php is pretty common
Depends what kind of functions I guess
 
@PeeHaa or helpers.php lol
 
I don't think I have ever seen helpers outside laravel?
 
6:29 PM
@PeeHaa oh, I have many times, laravel and ci has created this bad habit in many developers
 
Ah ci. I heard a lot of good things about it :P
 
:D
 
 
1 hour later…
7:55 PM
@Derick did you find the other people for your order of that elephpant ?
 
 
1 hour later…
9:05 PM
"helpers" predates Laravel. They just popularized a particularly lazy convention.
There's no formal or informal standard for naming files that are just a bunch of functions. By the time anyone asked the question, most of the community had moved to classes and thus PSR-0/4.
 
Sure there are several informal standards
 
The great thing about standards is there are enough for everybody.
 
The bad thing is most standards are crap :P
 
.user.ini may not be applied in subdirectories if CONTEXT_DOCUMENT_ROOT is set ・ CGI/CLI related ・ #80113
 
Wes
9:59 PM
so what causes phpstorm to crash is the markdown editor
 
Wes
10:10 PM
how does the == operator work in classes, structs, etc in c++? does it require to "overload" the operator, or is there a default impementation?
 
10:22 PM
I think I finally found the reason for my segfault. /* Silently convert buffered to unbuffered, for now */
 
10:34 PM
@Wes I don't think it's a useful comparison in practice.
Oh, C++. Never mind, I don't know there.
 
@Wes You must overload it.
 
Wes
makes sense
documentation on C and C++ is surprisingly hard to find
 
Well, not really. It's just that it expects you to be pretty knowledgeable for it to make sense.
 
Wes
kept landing on all those sites full of ads with very basic tutorials
i am probably searching wrong
 
10:58 PM
Who was it that wanted to work on function types? :-) reddit.com/r/PHP/comments/isima9/any_interest_in_function_types
 
@Danack
 
At least if you want something resembling an accessible documentation
 
Wes
 
11:14 PM
at least that's my goto site when I need to learn something [obscure] about C(++)
 
11:44 PM
@JoeWatkins Plenty, but none in London. And I ain't queueing at the post office for this.
 
Which elephant? O.o
 
Your mother
 
:(
 
Tell me about :( @Girgias. I feel like atlas
 
Sadly I'm too tired to tell the story of :( :-(
 
11:53 PM
ok :( :-( :(
 

« first day (3623 days earlier)      last day (1311 days later) »