php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55405 The documentation example for mysqli connect_errno says it's a function
Submitted: 2011-08-11 18:53 UTC Modified: 2011-08-11 20:18 UTC
From: pelle at pelleravn dot dk Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: OS X 10.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pelle at pelleravn dot dk
New email:
PHP Version: OS:

 

 [2011-08-11 18:53 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-11 20:18 UTC] 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 20:18 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 [2011-08-11 20:18 UTC] salathe@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 10:01:32 2024 UTC