php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57681 SCA::getService() immediate_caller_filename/directory problem
Submitted: 2007-05-24 06:35 UTC Modified: 2007-07-06 12:22 UTC
From: gcc@php.net Assigned:
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.2.1 OS: Win XP
Private report: No CVE-ID: None
 [2007-05-24 06:35 UTC] gcc@php.net
Description:
------------
SCA::getService() is using 
   $backtrace                 = debug_backtrace();
   $immediate_caller_filename = $backtrace[0]['file'];
to calculate the immediate_caller_filename/directory.  When SCA::getService() is called from fillInReferences, this corresponds to the SCA.php file, not the component.

Expected result:
----------------
$immediate_caller_filename/directory should be the component filename and directory.

Actual result:
--------------
$immediate_caller_filename/directory are the SCA.php filename and directory.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-06 12:22 UTC] mfp@php.net
This is fixed in that now we no longer use getService in any context other than called from a client script. The problem was occurring because we were also using getService from fillInReferences to create a proxy to fill in a reference within a component, when the backtrace was quite different. We now create a proxy properly in fillInReferences rather than call getService.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 12:03:13 2021 UTC