pear2 / pear2.php.net

PEAR2 website
http://pear2.php.net/
Other
19 stars 9 forks source link

PEAR2_Autoload bug report #16

Closed hidenori-wasa closed 12 years ago

hidenori-wasa commented 12 years ago

file: PEAR2_Autoload-0.2.4/php/PEAR2/Autoload.php line: 164 bug code: $file = strreplace(array('', '\'), DIRECTORY_SEPARATOR, $className) . '.php'; bug fix code: $file = str_replace('\', DIRECTORY_SEPARATOR, $className) . '.php'; commnet: Following class name cannot autoload. Foo_Foo

saltybeagle commented 12 years ago

Sorry, this is not a bug. The code is correct:

<?php
$class = 'Foo_Foo';
$file = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $class) . '.php';
var_dump($file);

Outputs: string(11) "Foo/Foo.php"

Also, you can file bugs for specific packages on their respective github project pages: https://github.com/pear2/Autoload

hidenori-wasa commented 12 years ago

Excuse me. As said to, it examines in the following site. https://github.com/pear2/Autoload

----- Original Message ----- From: "Brett Bieber" reply@reply.github.com To: "hidenori-wasa" wasa_@nifty.com Sent: Thursday, November 24, 2011 11:18 AM Subject: Re: [pear2.php.net] PEAR2_Autoload bug report (#16)

Sorry, this is not a bug. The code is correct:

<?php
$class = 'Foo_Foo';
$file = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $class) . 
'.php';
var_dump($file);

Outputs: string(11) "Foo/Foo.php"

Also, you can file bugs for specific packages on their respective github project pages: https://github.com/pear2/Autoload


Reply to this email directly or view it on GitHub: https://github.com/pear2/pear2.php.net/issues/16#issuecomment-2857577