Doc #55405 [Opn->Csd]: The documentation example for mysqli connect_errno says it's a function
| From: | salathe@php.net | Date: | Thu, 11 Aug 2011 20:18:49 +0000 |
| Subject: | Doc #55405 [Opn->Csd]: The documentation example for mysqli connect_errno says it's a function | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6994@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55405&edit=1
ID: 55405
Updated by: salathe@php.net
Reported by: pelle at pelleravn dot dk
Summary: The documentation example for mysqli connect_errno
says it's a function
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: OS X 10.7
PHP Version: Irrelevant
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2011-08-11 20:18:04] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=314798
Log: fix example (mysqli::connect_* are properties not methods, doc #55405)
------------------------------------------------------------------------
[2011-08-11 18:53:43] pelle at pelleravn dot dk
Description:
------------
The documentation for: http://php.net/manual/en/mysqli.query.php
The example for how to make a query with MySQLi it have an example how to connect
to MySQL as well, using MySQLi.
In the example it uses a method called "connect_errno()". But it's not a
method/function, it's a instance variable.
Test script:
---------------
if ($mysqli->connect_errno()) {
printf("Connect failed: %s\n", $mysqli->connect_error());
exit();
}
Expected result:
----------------
PHP should print out that "Connect failed" with an error description.
Actual result:
--------------
PHP gives a fatal error.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55405&edit=1