#34902 [Opn->Csd]: $mysqli::character_set_name() - undefined method
| From: | tony2001@php.net | Date: | Tue, 18 Oct 2005 10:02:35 +0000 |
| Subject: | #34902 [Opn->Csd]: $mysqli::character_set_name() - undefined method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86683@lists.php.net to get a copy of this message | ||
ID: 34902
Updated by: tony2001@php.net
Reported By: max at webscript dot ru
-Status: Open
+Status: Closed
Bug Type: MySQLi related
Operating System: Windows XP Pro
PHP Version: 5CVS-2005-10-18 (snap)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-10-18 09:07:00] max at webscript dot ru
Description:
------------
Method character_set_name() is undefined but procedural style works
fine.
PHP 5.1.0RC4-dev
MySQL client - 4.1.14
Reproduce code:
---------------
// procedural style (works fine)
$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
var_dump(mysqli_client_encoding($conn));
var_dump(mysqli_character_set_name($conn));
mysqli_close($conn);
// oop style - got error
$conn = new mysqli($db_host, $db_user, $db_pass, $db_name);
var_dump($conn->client_encoding());
var_dump($conn->character_set_name());
$conn->close();
Expected result:
----------------
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
Actual result:
--------------
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
string(17) "latin1_swedish_ci"
Fatal error: Call to undefined method mysqli::character_set_name() in
C:\usr\mysqli\a.php on line 9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34902&edit=1