svn: /phpdoc/en/trunk/reference/network/functions/ getprotobyname.xml
| From: | Xinchen Hui | Date: | Wed, 18 Jan 2012 02:46:50 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/network/functions/ getprotobyname.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9477@lists.php.net to get a copy of this message | ||
laruence Wed, 18 Jan 2012 02:46:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=322431
Log:
Fixed bug #60781 (getprotobyname: returns FALSE, not -1)
Bug: https://bugs.php.net/60781 (error getting bug
information)
Changed paths:
U phpdoc/en/trunk/reference/network/functions/getprotobyname.xml
Modified: phpdoc/en/trunk/reference/network/functions/getprotobyname.xml
===================================================================
--- phpdoc/en/trunk/reference/network/functions/getprotobyname.xml 2012-01-17 22:51:25 UTC (rev
322430)
+++ phpdoc/en/trunk/reference/network/functions/getprotobyname.xml 2012-01-18 02:46:50 UTC (rev
322431)
@@ -38,7 +38,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the protocol number or -1 if the protocol is not found.
+ Returns the protocol number, &return.falseforfailure;.
</para>
</refsect1>
@@ -52,7 +52,7 @@
<?php
$protocol = 'tcp';
$get_prot = getprotobyname($protocol);
-if ($get_prot == -1) {
+if ($get_prot === FALSE) {
echo 'Invalid Protocol';
} else {
echo 'Protocol #' . $get_prot;