« first day (1415 days earlier)      last day (3525 days later) » 

10:11 AM
There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.
 
 
6 hours later…
4:02 PM
 
4:28 PM
How is the screen ID determined for each admin page?
More specifically, I suppose... Post types.
 
4:39 PM
see WP_Screen->get()
 
 
3 hours later…
7:32 PM
The only thing that holds WordPress together is the file system.
slow clap
 
 
1 hour later…
8:54 PM
try {
    thing_that_fails_with_exception();
}
catch ( \Exception $e ) {
    fix_thing_that_fails();
}
Wonder if that somehow is a valid scenario to handle an exception :)
 
why not?
 
Well, in words you are practically saying "catch the exception, then go off drink a beer (for e.g.)"
It just feels odd to say "catch" and then go and do something completely different.
 
example from Meadow: try { load twig template } catch ( there is no twig template ) { load php template }
note that you can be catching specific kind of exception and not just any exception
 
I know that. In the case where I started thinking about it, it's a PDOException from Doctrine (no Database present).
What got me thinking is that (in this Silex App), I have a method that checks if there is a connection to the Database. And in a second step, it's checking the available database tables. If one doesn't exist, I need to create it. So I thought about using the try/catch as switch. And that didn't sound valid to me.
 
9:10 PM
it is if/else :) just with bubbling :)
note there is also finally now
 
Never seen finally before.
 
it's recent, PHP 5.5+
 
nice
 

« first day (1415 days earlier)      last day (3525 days later) »