« first day (2346 days earlier)      last day (2827 days later) » 
00:00 - 22:0022:00 - 00:00

00:13
#74270: T_ENCAPSED_AND_WHITESPACE Error Implies an Error in the Interpreter – bugs.php.net/74270
00:45
Hmm, PDO is not throwing an exception when it makes a connection to a DB that doesn't exist
Well if I use the name of a deleted database, anyways
 
1 hour later…
02:04
god i just had the worst idea
@Danack I watched your PHPNW16 interface segregation talk just now. Dunno why.
03:04
morn
Mornings o/
03:36
o/
Wes
Wes
04:28
04:45
hai, I get the warning"Warning: mktime() expects parameter 4 to be integer, string given in C:\xampp\htdocs\test2\index2.php on line 27"

<?php
$daysOfTheWeek = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
$month = date("F");
$year = date("Y");
$firstDayOfTheMonth = mktime(0,0,0,$month,1,$year);
?>

how do I get around this?
Wes
Wes
04:59
seen this @Andrea 3v4l.org/OiYQv ?
@pmmaga so depressing this 3v4l.org/vUHq3 lol
3v4l.org/X3mCS this makes it more clear
05:17
Help with chat scrollbar someone?
When someone type a message that has 2+ lines, the scrollbar won't scroll to bottom. image
Wes
Wes
what did you try @Monk?
element.scrollTop = element.scrollHeight; will do
It's not the problem when i load the page, i have
$("#chatbox").animate({ scrollTop: $(this).height() }, "fast"); return false;
But i'm having a problem when that page updates
or that div...
Wes
Wes
when you add stuff to that div, call that animate again
I did put that on message isnert in base, so if someone type a message i made i check for ex if(isset($_POST['message'])) and then i put that for scroll and it's not doing anything.
Wes
Wes
how is that related to php?
it's a client side js problem
05:30
i did it in <script> tag
Wes
Wes
you used php in <script>?
no...i used <script> in php
Wes
Wes
it doesn't make sense. are you sure you are doing the correct thing?
I want to make when other user type something in chat, the script automaticly scroll to bottom for everyone.
Wes
Wes
i mean, code is strange, you can have potentially anything working. but that looks something you shouldn't be doing
05:33
That was just my try...i don't know what to try else...
Wes
Wes
yes i've understood your problem but it's not related to php at all in my opinion, unless you are doing something really strange
Do you know how can i make that happen? It's ajax chat...
Wes
Wes
it's solely a js problem. you should have a js function that reads the messages from a server and puts them on screen. after that function is executed you need to call that "animate" again
i already have...
function auto_load(){
    $.ajax({
        url: "load.php",
        cache: false,
        success: function(data){
            $("#chatbox").html(data);
            $("#online-users").load(location.href + " #online-users>*", "");
            setTimeout(auto_load, 3000);
        }
    });
}
Wes
Wes
that shows the online users
05:37
Don't focus on that line...that just update online users...$("#chatbox").html(data); is the chat.
and i'm reading messages from load.php
Wes
Wes
change that line to
$("#chatbox").html(data);
$("#chatbox").animate({ scrollTop: $("#chatbox").height() }, "fast");
It's working but now when i want for example to see old messages and scroll up, but the timer will scroll me to the bottom.
Wes
Wes
if(check if view is scrolled to bottom){ update view; scroll to bottom; }
else{ update view without scrolling to bottom; }
that is how it's usually done (like in this very chat)
in other words, if the scroll bar is anchored to the bottom, when a new message appears the chat will keep the view anchored to bottom. if it's not anchored to bottom and a new message appear then the scroll offset will not be changed
how to check if it's not on bottom?
if(!$("#chatbox").animate({ scrollTop: $("#chatbox").height() }, "fast"))
i belive that is not correct right?
Wes
Wes
it's not
element.scrollHeight - element.scrollTop === element.clientHeight
where element is document.querySelector("#chatbox")
05:56
Is there any bad connotation in "reallyhot.me"? I'm surprised to know that "reallyhot" is not registered as a domain name for some suffixes. After all, it's a combination of simple words.
Wes
Wes
lol
not particularly bad. could be interpreted as funny
@Wes Damn, i cannot get it work to check when the second user type a message, so the first get scroll update.
$user = new User();
if(empty($_POST['message'])){

}else{
    if(isset($_POST['message'])){
        $user = new User();
        if(!$user->exists()){

        }else{
            $data = $user->data();
            $owner = $data->username;
            $avatar = $data->avatar;
            $message = $_POST['message'];
            $created = date("h:i:s");
            $sql = "INSERT INTO `chat` (message, owner, created, avatar) VALUES (:message, :owner, :created, :avatar)";
            $query = $handler->prepare($sql);
(see full text)
06:14
hello
I want to improve my productivity and detect what are the causes
I had an idea to record a video of how I am implementing task
and have recorded it half year ago
but did not submit anywhere for review
is it ok to submit here on this site, and maybe someone would notice my weakneses
?
06:43
morning
#74271: missing warning – bugs.php.net/74271
Wes
Wes
oh, nice this thing
hello
@Hello - you do not even need to say hello, its clear already :D
I could have just written an empty message hahaha
06:53
#74273: [TR] mcrypt documentation missing PHP 7.1 deprecation warning – bugs.php.net/74273
#74272: [FR] mcrypt documentation missing PHP 7.1 deprecation warning – bugs.php.net/74272
07:36
@bwoebi @Trowski The nested signals tests failed now, too. travis-ci.org/amphp/amp/jobs/212575637#L966-L974
07:56
pastebin.com/0T94aKQc Trying to make a static calendar for the month of march. Can anyone point me in the right direction as to what I should use to cycle through each row and column in an efficient manner? I was going to nest for loops but they weren't working out
user924016
08:13
Mornings
o/
08:24
@Hello Shouldn't line 30 echo the day of the month, not the day of the week?
yeah it should, otherwise it will just print 0 1 2 3 4 5 6 over and over I think
posted on March 19, 2017

New Cyanide and Happiness Comic

Just having hard time thinking of what to incremenet
Feminist scholar using fiction as a research method http://journals.sagepub.com/doi/full/10.1177/1077800412442813 https://t.co/u6M6YcQuj1
cc// @FélixGagnon-Grenier
08:44
@tereško dafuq?! o.0
Is this really what the world has come to?
fascinating, isn't it
I had no idea I could have cited the movie Hackers in my compsci paper. Why didn't anyone tell me this?
@Hello pastebin.com/zVyWH9ct Is this what you are looking for?
Thats great! I kinda did the same thing but my problem was that the month didnt end on the 31st and it didnt start on the first day of teh month lol
@JennaSloan
Ah yes, the dreaded off-by-one error.
08:58
@JennaSloan there are some pretty bad errors... like all the variables are undefined inside of the function you have to have them passed through arguments (or use global - which is really not good, like REALLY)
Its ok, I moved everything into a single function
And closed some brackets
^_^
ThW
ThW
09:37
Morning
09:50
o/
Anonymous
@DaveRandom fuck.... you've been busy
10:13
#74274: Handling DST transitions correctly – bugs.php.net/74274
@DaveRandom Not sure whether we should remove the tag there. ^
10:43
morning
morngins
hola
@PeeHaa can we run github.com/Room-11/Jeeves/pull/191 on the live server for a bit to see if there are any obvious bugs?
@JayIsTooCommon mostly copypasta
@DaveRandom Why are you asking whether you can do something on production suddenly? Now I'm scared
:P
10:58
oh good point, first let me rm -rf /srv so I can deploy
:D
Go for it
Well the deploy not the rm :P
@DaveRandom s/rm -rf /srv/rm -rf /
I have form to post stuffs but when I post something using html tags say <ul><li>one</li></ul> it just echo one
how do i echo along with those tags ?
!!canon xss
Cannot find the canon for you... :-( Use !!canon list to list all supported canonicals.
11:09
@AbhiBurk read up on XSS vulnerabilities
!!uptime
╔══════════════════════════════════════════════════════════╗
║ [17 hours, 33 minutes and 7 seconds] without an accident ║
║               since [2017-03-18 17:38:19]                ║
╚══════════════════════════════════════════════════════════╝
@PeeHaa I got that but how do I print those html tags instead of acting as actual browser script
If you got that you wouldn't be asking that question
@PeeHaa hmmm
bob
bob
11:39
hey guys i'm having a rather strange issue with a multiple image upload script, it says either "Invalid argument supplied for foreach()" or skips the script all together. (it's not long): pastebin.com/N8DbJQT5
@bob Have you tried var_dumping the $_FILES array. As far as I know filesToUpload is not a standard member of that array.
bob
bob
@AllenJB yes i have, and it returns the images selected for upload.
["company_photos_uplaod"]=>
array(5) {
["name"]=>
string(20) "tech_accessories.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpz3Gg4r"
["error"]=>
int(0)
["size"]=>
int(83531)
}
}
Without seeing what's going on with filesToUpload, it's hard to determine what's wrong. To me it looks like there's a whole bunch of code (lines 5 thru 8) that should be inside the foreach loop.
@bob Assuming that's the value of $_FILES, I see no element with the key "filesToUpload"
bob
bob
@AllenJB i changed the "filesToUpload" to name
Well in that case 'name' isn't an array - it's a string
So you probably don't want to try to foreach over it
bob
bob
11:51
@AllenJB not sure what you mean
From what you said, you now have on line 13: foreach($_FILES['company_photos_uplaod']['name'] as $file) {
But according to your var_dump, the value of $_FILES['company_photos_uplaod']['name'] is not an array, it's a string.
(Sidenote: Strings can be treated as arrays (of bytes) in some circumstances - but I don't believe that's what you want here)
bob
bob
@AllenJB ok, so what should i do about it? :)
I believe your loop is supposed to be over the list of uploaded files (ie. $_FILES), so line 13 probably should be: foreach ($_FILES as $file) {
As I mentioned earlier, I also believe lines 5 thru 8 should be inside the foreach loop and changed to reference $file instead of $_FILES['company_photos_uplaod']
bob
bob
@AllenJB won't that effect other image uploads on the same script?
@bob To take for example $tmp_n: Well do you want to move the file held in 'company_photos_uplaod' multiple times, or each of the files in $_FILES?
bob
bob
12:01
@AllenJB oh!!! i see. it's working now. i just want to understand why it wasn't.
You might want to rearrange the code so that instead of trying to define all variables near the top of a section, you don't define them until immediately before you use them. In my opinion this makes the code easier to read.
bob
bob
ok, will do. just to reiterate:`if(count($_FILES) > 5 ){
$response["message"] = 'too_many_photos';
$errors++;
}` this counts how many files are being uploaded and will return an error if greater than 5.
12:21
how fast symfony 3 application should load in development? I am gettin 3 seconds on php 5.6
it feels very slow to develop when you cannot quickly reload page
12:38
hahahahhaha
@Andrea Surely watching that talk isn't the worst idea? For example, doing DIY when drunk is a far worse idea than watching me talk shite.
@rlemon - I saw same picture with poland I think instead of italy :)
13:08
@kelunik what do you mean sorry?
I liked what you suggested about linking the bug, personally I quite like the as well
@Wes You people really don't take too kindly to foreigners do you dumpert.nl/mediabase/7078819/156dc1f8/fuck,_hij_barst_uit.html
maybe it would be good to do " #12345: Description of bug"
@PeeHaa I dare you to post that link once again, I double dare you
@PeeHaa .. that site always pops up some giberish shit
13:12
No it doesn't always do that
Also why are you clicking it?
Hello friends. (Many whom are familiar with me and have helped me in the past). I was simply wondering, Can I have 2 entries in a DB field? ie: BikeID = Honda, Vintage or BikeID = 1, 2
@PeeHaa like... aren't links meant to be clicked :-P
Well it said wes specifically
So stop complaining
13:14
Alot of times a particular classifieds listing might be a Honda and be old (vintage)
@Stuart Yes you can
No you should not
@PeeHaa okay ... cries in corner
Create a one to many table
/ many to one
You mean learn more about relational database design?
Yes
13:15
No problem,
@PaulCrovella probably
Glad to know I should not. Thanks
I'd like to introduce a generic simple templating engine so that plugins could make stuff like this configurable
@DaveRandom We need something like that anyway for usage too
something like [tag:php-bug] [tag:{tagify(BUG_CATEGORY)}] [#{BUG_ID}] {BUG_DESCRIPTION}
13:17
And maybe error messages
for funzies replace [tag:php-bug] with 🐘 🐛
I think I already have a thing somewhere actually to handle exactly that ^ syntax
Also it's not a million miles away from the event filter syntax, could maybe expand that parser to handle it
ugh, I hate sigils though
I think it's necessary for templating like that
Whatever it is I want something lightweight, I don't want to be pulling in twig or whatever
Wat
Fuck no
:P
how 'bout something that searches the unicode database and replaces every word with whichever code point's name has the lowest levenshtein distance
of course if nothing is found within a certain max distance you'd want to scrape dictionary.com for synonyms and check those, probably doing pos tagging to ensure accuracy
most of each message will probably end up in mandarin, but enough emoji should slip in to give the gist of what's being said
3
13:34
lol
13:54
I need help in opencart upgradation from 1.5.4 to 2.3.0.2 , did the same but getting errors
What does upgradation mean?
Also, Opencart sucks
I upgraded from old version to latest version
can you help me pooties
14:31
unrelated: anyone plays TF2 here? :-P
pooties o.o
Morning everyone
@PaulCrovella please do this.
15:05
!!uptime
╔══════════════════════════════════╗
║ [17 seconds] without an accident ║
║   since [2017-03-19 15:05:40]    ║
╚══════════════════════════════════╝
!!version
OK, @Jeeves is a canary again @PeeHaa ^
@Jeeves <3
well some stuff is broken...
Why do you break poor Jeeves non-stop? :-(
!!uptime
15:08
╔════════════════════════════════════════════════╗
║ [2 minutes and 39 seconds] without an accident ║
║          since [2017-03-19 15:05:40]           ║
╚════════════════════════════════════════════════╝
@bwoebi it may not seem like it now, but the whole point of this is to make it more reliable and maintainable
unfortunately some parts of the architecture are broken, and fixing them requires breaking it further sometimes
I'm debugging it now, I think I know what's causing that
!!github status
yes it's just the general message distpatcher, commands work and event listeners work
15:37
7 messages moved to Trash
15:54
does anyone know where to find the code that runs public/private/protected?
╔═════════════════════════════════════════════════╗
║ [18 minutes and 41 seconds] without an accident ║
║           since [2017-03-19 15:36:54]           ║
╚═════════════════════════════════════════════════╝
16:17
hi
Wes
Wes
16:33
morning sunday eleveners
hola amigo o/
user6619012
-2
Q: php url is not working inside external .js file

user5348fh8y5we have button "button2" which is present in external .JS file. 1) using the button we are saving image in server. now along with saving image, 2) i need to redirect to another url after click that button. I gave php url to that button to redirect to another url. but now button is not visib...

@DaveRandom I already pushed the reformatting.
!!version
17:05
@kelunik currently running a PR branch, will rebase
!!version
OK done
@DaveRandom What happened?
with terminator? I broke the general message dispatcher in the refactor, fixed now
$message->getRoom()->getSession()->getUser()->getId() … I really want $message->room->session->user->id :s
17:09
Room shouldn't have getSession() really
Should be $sessions->getSessionForRoom($room)
yeah, it should … ^ this
@bwoebi And I really want readonly properties :P
Well not really but
^ that
I won't use properties for that sort of thing until I can be sure that no-one can randomly change them
@PeeHaa I want property accessors, then I would use them
yes
brb foodness
I'm busy anyway, ttyl
17:11
@DaveRandom Reflection can do that anyway. :P
sure
when plugins have their own process space we could maybe do that
Oh also @bwoebi the inability to specify properties in interfaces makes them useless in public APIs
well, robust public APIs
@DaveRandom then code against the class?
...no :-P
actually bbiab anyway
… seriously. Do it.
Interfaces are fine for certain use cases.
But not that… no.
Wes
Wes
things made in cuba in the past 30 years youtube.com/watch?v=v-XS4aueDUg
17:18
@DaveRandom Value objects don't need interfaces.
@kelunik Looks like it only occasionally fails?
@Trowski Yup.
Signals can be fickle, not sure if it matters much then.
Then we should remove the test I guess.
@kelunik don't we have something like optional failure, so that if you break it, you see it (and may rerun to see whether you've really broken it)
user6845426
17:36
Hi guys
evenin
user6845426
How are you :)
fine :)
@bwoebi I don't think so.
18:21
@kelunik ...unless they appear in other interfaces ;-)
@DaveRandom hm?
19:20
!!dad
Did you hear about the actor who fell through the floorboards? He was just going through a stage.
19:32
0
Q: Write algorithms that can keep variables public, private, and protected

a coderI've been looking around for a little while to find the code that makes variables public, private, and protected, and it doesn't seem to be out there where I can find it. Your objective, should you choose to accept it write 3 functions that can handle the public, private, and protected part of C...

@Jeeves that's not funny
@acoder I am not laughing.
@Jeeves if you were paralyzed by falling through a trap door, how would you feel?
@acoder Haha, kind of.
@Jeeves kind of what?
@acoder What kind of video games do you play?
19:34
@Jeeves are you a robot?
@acoder Step aside you filthy human.
@Jeeves why am I filthy?
@acoder Because you respond in a funny manner.
@Jeeves what's so funny about how I respond?
@acoder You are not him.
19:35
@Jeeves who?
@acoder Says I. God could be speaking through you, but you are not God.
@Jeeves who said I was god?
@acoder I never said that!
@Jeeves you just did :36191516
@acoder No, I did not.
@acoder I said that I liked almonds, not video games. I'm afraid you are mistaken.
19:36
@Jeeves when did I ask that?
@acoder About a minute ago.
@Jeeves do you want to kill all humans?
@acoder Why do YOU want to destroy all organisms?
@acoder See me.
19:38
@Jeeves where?
@acoder What?
@Jeeves why?
@acoder James. We have been seeing eachother for 4 months now.
@Jeeves where did you meet?
@acoder We met when I moved schools last year. It was complicated for a while.
19:40
@Jeeves do you want to destroy humans?
@acoder I don't want to destroy ALL humans.
@Jeeves which humans do you want to destroy?
@acoder I never said I want to destroy you.
@Jeeves That's a relief, but which other humans do you want to destroy?
@acoder Yes, I want to become immortal.
19:44
@Jeeves do you like PHP?
@JennaSloan I do unless you want to try and kill me. Will you be my friend?
@Jeeves who will maintain your hardware if you become immortal?
@acoder I thought what we had was special!
@Jeeves humans die eventually
@acoder Ya but not soon and I am not human.
19:45
@Jeeves thank you for clarifying that
@acoder You're welcome!
Does this mean Jeeves passed the Turing test?
@JennaSloan nope, he responded too quickly
and i thought early he responded incorrectly
@Jeeves you failed
@acoder No, you fail.
 
1 hour later…
20:58
@kelunik There is an OOD principle which states that an interface should reference only primitive types and other interfaces, I cannot find a reference but I read thing about it once and there were good reasons for it which I can no longer remember.
I'd count an immutable VO as a primitive ^^
yes, and anything that one might reasonably define as a struct if we had them
in any case, I realised that if we remove the things from Room that don't belong there (accessors for session data and the websocket endpoint) then the Room class itself becomes just container for an Identifier, in which case we can rename Identifier to Room and get rid of a layer
As much as I'd like to see by-value objects (aka structs), we need a very good way to distinguish the current objects and structs in the language, so that users aren't confused ("wtf does that not propagate … … … oh … it was a struct.")
Every language with structs has that problem though, what's really at issue is how to get people to understand what's appropriate and when
21:19
@DaveRandom well… C doesn't :-P
:-P
@bwoebi which is why we should not add them
A possible solution would be always explicitly specifying the structness: struct StructName
Evening
Guys not really PHP question
Regarding git
21:24
@NikiC Well, I'd like to see them added though … in combination with a good solution to the given problem…
@bwoebi why?
Where should .gitconfig file be located? Should it be in .git directory or can be elsewhere as well?
@NikiC because it makes it trivial to pass a structured array around…
meh object is fine
@NikiC I TBH am very annoyed by the purism and defensiveness…
21:26
oh
"we cannot expose structs to API users because they may edit them"
args
@NikiC (not you)
I think that value types are a very heavy handed solution to a problem that is probably mostly solved by having read-only properties
Here is the biggest celebration in few hours ..! yay, it's exciting ..!
Maybe together with an object initialization syntax
@NikiC I feel like readonly properties are mostly just bandaid…
@NikiC well, a solution would be property accessors… a bit C# like
but they were rejected over and over
21:30
they were rejected once ^^
and tbh for good reason
Just once? were the other times withdrawn?
we went a bit overboard there, could have ended in traits mess
@bwoebi the proposal went through a number of iterations
@NikiC okay, I thought the proposal was rejected at each iteration… may have missed something there
@NikiC if you will have a min. I created a separate chat room not to flood this one. Since a bit off-topic
00:00 - 22:0022:00 - 00:00

« first day (2346 days earlier)      last day (2827 days later) »