note 115693 added to function.ftp-login
| From: | TravisWeston | Date: | Tue, 09 Sep 2014 20:47:05 +0000 |
| Subject: | note 115693 added to function.ftp-login | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200400@lists.php.net to get a copy of this message | ||
To suppress the PHP warning, just prepend the function with the error suppression character @.
I'm usually against error suppression, but apparently some genius thought it was a good idea to
really drive the point home that you have a bad login. Returning false wasn't enough?
if( ! @ftp_login( $connection, 'USERNAME', 'PASSWORD' ) ){
die( 'Bad login, but no PHP warning thrown.');
}
----
Server IP: 72.52.91.14
Probable Submitter: 66.186.164.68
----
Manual Page -- http://php.net/manual/en/function.ftp-login.php
Edit -- https://master.php.net/note/edit/115693
Del: integrated -- https://master.php.net/note/delete/115693/integrated
Del: useless -- https://master.php.net/note/delete/115693/useless
Del: bad code -- https://master.php.net/note/delete/115693/bad+code
Del: spam -- https://master.php.net/note/delete/115693/spam
Del: non-english -- https://master.php.net/note/delete/115693/non-english
Del: in docs -- https://master.php.net/note/delete/115693/in+docs
Del: other reasons-- https://master.php.net/note/delete/115693
Reject -- https://master.php.net/note/reject/115693
Search -- https://master.php.net/manage/user-notes.php