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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 - 2 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC