php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65286 yaf affect native PHP function class_exists
Submitted: 2013-07-18 09:28 UTC Modified: 2013-07-22 08:12 UTC
From: fengdingbo at gmail dot com Assigned:
Status: Not a bug Package: yaf (PECL)
PHP Version: 5.4.17 OS: Linux ubuntu 3.5.0-36-generic #5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fengdingbo at gmail dot com
New email:
PHP Version: OS:

 

 [2013-07-18 09:28 UTC] fengdingbo at gmail dot com
Description:
------------
The code inside the Controller class_exists ('db').
Will result in an error.
Warning: Yaf_Loader::autoload(): Failed opening script librarys/db.php: No such 
file or directory in /home/qiufeng/work/yaf/application/controllers/Index.php on 
line 5

Test script:
---------------
<?php
class IndexController extends Yaf_Controller_Abstract {
	public function indexAction() {
		class_exists('db');
	}
}
?>
//=======================
// output
Warning: Yaf_Loader::autoload(): Failed opening script librarys/db.php: No such file or directory in /home/qiufeng/work/yaf/application/controllers/Index.php on line 5

Expected result:
----------------
Does not affect its own function.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-21 10:14 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 [2013-07-21 10:14 UTC] laruence@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

that's is because class_exists called yaf autoload routine

you can use class_exists("db", false) to prevent that..
 [2013-07-22 08:12 UTC] fengdingbo at gmail dot com
Use yaf framework before,the second parameter in class_exists function not need.

Use yaf framework after,the second parameter in class_exists function must is 
false?

Is that normal?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Mar 11 06:01:29 2025 UTC