|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-01 14:45 UTC] satanistlav at mail dot ru
Description:
------------
The Linux hosting server I use recently upgraded PHP Version to 5.0.4. After upgrade all function and and class methods those had capital "I" letter in the function names became unrecognized by PHP. No such problem I had in previouse version of PHP, and no problem in my local server (WinXP, Apache 2, PHP v5.0.5)
Reproduce code:
---------------
//Part of mail class
.....
/**
* Sets Mailer to send message using SMTP.
* @return void
*/
function IsSMTP() {
$this->Mailer = "smtp";
}
/**
* Sets Mailer to send message using PHP mail() function.
* @return void
*/
function IsMail() {
$this->Mailer = "mail";
}
.....
/********* I used class methods *******************/
.....
$mailer->IsHtml(true);
$mailer->IsMail();
.....
Expected result:
----------------
Execution of class method is expected
Actual result:
--------------
/********* I got error ********************/
Fatal error: Call to undefined method PHPMailer::IsHtml() in ....
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 16:00:01 2025 UTC |
I can reproduce this with the following short script: <?php class foo { function IsHere() { echo "here\n"; } } echo setlocale(LC_ALL, 'tr_TR'), "\n"; $f = new foo(); $f->IsHere(); ?> (You need to have the tr_TR locale installed for this). It does work properly with PHP 5.1 actually, and it has to to with the zend_str_tolower() function which uses the tolower() libc call, which uses the locale. As in Turkish the I does not lowercase to i you can get weird things. This is why we should get rid of case insensitive function names. It also works with normal function names (instead of classes' methods)