php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56507 APD makes reflection API throw exceptions
Submitted: 2005-08-23 09:37 UTC Modified: 2015-02-26 07:39 UTC
From: jacob at aub dot dk Assigned: gschlossnagle (profile)
Status: Suspended Package: apd (PECL)
PHP Version: 5.0.3 OS: FreeBSD
Private report: No CVE-ID: None
 [2005-08-23 09:37 UTC] jacob at aub dot dk
Description:
------------
Using what should be apd-1.0.1 (though is said to be 0.9 in phpinfo) I get exceptions using the PHP5 reflection API. This happens whenever apd is enabled in my php.ini irregardless of wether I actually use the apd function. When I disable loading of the apd.so the problem goes away.

Reproduce code:
---------------
<?php

class Foo {
  function Bar($var1='baz') {}
}

$class = new ReflectionClass('Foo');
$method = $class->getMethod('Bar');
$parameters = $method->getParameters();
if($parameters[0]->getDefaultValue() == 'baz') {
  print "Correct\n";
} else {
  print "Error\n";
}

?>

Expected result:
----------------
"Correct\n" is printed to stdout.

Actual result:
--------------
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Internal error' in /usr/home/jacob/apd_bug/apdbug.php:12
Stack trace:
#0 /usr/home/jacob/apd_bug/apdbug.php(12): ReflectionParameter->getDefaultValue()
#1 {main}
  thrown in /usr/home/jacob/apd_bug/apdbug.php on line 12

Fatal error: Uncaught exception 'ReflectionException' with message 'Internal error' in /usr/home/jacob/apd_bug/apdbug.php:12
Stack trace:
#0 /usr/home/jacob/apd_bug/apdbug.php(12): ReflectionParameter->getDefaultValue()
#1 {main}
  thrown in /usr/home/jacob/apd_bug/apdbug.php on line 12


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-29 18:48 UTC] skissane at gmail dot com
Xdebug 1.3.2 produces identical behaviour. (Internal error when trying to get default values.)
 [2015-02-26 07:39 UTC] krakjoe@php.net
-Status: Assigned +Status: Suspended
 [2015-02-26 07:39 UTC] krakjoe@php.net
APD hasn't had a release in 10 years, this means it's source code is way out of sync with modern PHP.

I'm going to mark this bug as suspended, the report can still be found if a maintainer for APD comes forward.

Sorry about the wait.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 01 17:01:32 2024 UTC