@mariushm said:
So what's wrong with this... it works just as intended. Just uses some more memory.
It works as intended, but I just can't imagine why anyone would do it that way.
more "a bit funny" than "real wtf".
@mariushm said:
So what's wrong with this... it works just as intended. Just uses some more memory.
It works as intended, but I just can't imagine why anyone would do it that way.
more "a bit funny" than "real wtf".
I just ran into this code written by an ex-employee of the company I currently work for:
foreach ($this->result as $content){
$listId[ ] = $content['id'];
$listName[ ] = $content['label'];
}
return array_combine($listId,$listName);
mod: fixed code format -dh
[ Fixed hideous typo in title. -TheShadowMod ]
@smxlong said:
@Zecc said:@Evo said:
But I agree it's probably just skeleton code......currently being pushed into production.So instead of you know, maybe letting your colleague know about what was obviously an oversight so he can fix it, you just post it here and laugh at him?
He was on vacation last week, and after posting here I looked for calls to the function in the project and it seems unused.
And if some code is obviously wrong but harmless, I prefer to laugh at it than play professor know-better-than-you.
if the function doesn't explicitely return something, it returns null.
I just found the following method written by a coworker in a php application that is currently being pushed into production:
public function confirmMessage($message) { if($message){ return $message ; } }
I'm affraid to look for where it is used.
The company I currently work for (not for long) has two different activities:
The first one is a DMS (Document Management System) product sold to companies to help them manage their documents.
It features fine-grained access management, versionning, full-text search in most common document types.
The second is web sites development.
When the website pole needs to share a document with a client o, the standard process is to put it on a ftp server in a folder labelled with the client name, and to send the ftp login/password to the client.
Yes, there is only one login/password pair for this ftp.
Linebreaks -- Ling