|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57330 Cannot redifine or add methods for non-user-defined classes
Submitted: 2006-10-28 15:36 UTC Modified: 2021-05-10 15:05 UTC
Avg. Score:4.0 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (20.0%)
From: theoallardyce at gmail dot com Assigned: cmb (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.1.2 OS: Ubuntu
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: theoallardyce at gmail dot com
New email:
PHP Version: OS:


 [2006-10-28 15:36 UTC] theoallardyce at gmail dot com
In runkit 0.9

When runkit.internal_override is enabled (=1) re-declaring normal non-user-defined functions works fine however you cannot re-declare or add a method to a non-user-defined class, it returns the error: "class [] is not a user-defined class".

Perhaps this is due to RUNKIT_G(internal_override) not being checked in runkit_methods.c?

Reproduce code:
echo runkit_method_redefine(
   'return $test;',

echo runkit_method_add(
   'return $test;',

Expected result:

Actual result:
Warning: runkit_method_redefine() [function.runkit-method-redefine]: class domelement is not a user-defined class..

Warning: runkit_method_add() [function.runkit-method-add]: class domelement is not a user-defined class...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-03 18:28 UTC]
For the record: also reported as <>.
 [2021-05-10 15:05 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-05-10 15:05 UTC]
I'm closing this ticket, since the proper place to report runkit
related issues is <>.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 08:01:28 2024 UTC