edorian
  • Member for 10 years, 10 months
  • Last seen more than 3 years ago
2 answers
11 votes
375 views
Is this a sufficient way to prevent script injections and other bad stuff in strings
Accepted answer
17 votes

That one is quite simple (for me at least) since there is a very general answer :) NO There is no way you can ever really safely "repair" user input. "Please provide a list of everything you ...

View answer
8 answers
32 votes
19k views
is_numeric_array() is missing
14 votes

Improving a little on @sepp2k answer(+1) (removing the "unused variable warning" some tools will spit out): foreach (array_keys($array) as $a)) { if (!is_int($a)) { return false; } } ...

View answer
7 answers
45 votes
2k views
Instantiating objects with many attributes
8 votes

As @LRE answer (+1) mentioned his PHP-fu is weak and since his points are correct and valid i just want to provide some more php code to illustrate : class OpenIdProviderOptions { private $path; ...

View answer
4 answers
27 votes
2k views
PHP Autoloader Library
8 votes

Some points i found: Thats the class is marked as abstract struck me as odd as i found out it only has static method calls and since it uses "self::" for static call i guess there is no meaningful ...

View answer
1 answers
9 votes
441 views
Database method to query
Accepted answer
6 votes

That query method (and the db class) has a lot of responsibilities: Do the PDO stuff, connection handling Be a query builder be a query executor Handle the params and possibly execute the same ...

View answer
2 answers
9 votes
1k views
Comparing data in 2 tables on different servers with CHECKSUM
5 votes

We use mk-table-checksum. It works really great in Master-Slave context where it also allows to sync differences in both directions depending on your choice. Saidly from what i've seen most people ...

View answer
2 answers
7 votes
1k views
Critique My Codeigniter Custom CMS Pages Model
4 votes

I don't know Codeigniter so i can't comment on "is this a propper model". For my answer i'm just going to assume it is. It's not much code so i'm going to focus on some details: public function ...

View answer
1 answers
2 votes
486 views
MySQLi_STMT wrapper, allows placeholders
Accepted answer
2 votes

Before reading the actually implementation: What you doing is a pdo-like placeholder syntax with a # instead of a : and without the need to bind the parameters directly but only pass in a array. I ...

View answer
2 answers
6 votes
440 views
User error logging
1 votes

Preface: I'm not going to talk about alternatives to trigger_error for now. Edit: Someone else did, perfect ! :) About the config: I assume those settings are what you are using in development ? ...

View answer