View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004638 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2012-10-18 11:57 | 2012-12-10 13:33 |
Reporter | tjungcl | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.6.5 revision 49955 | ||||
Summary | 0004638: extending two classes with the same class | ||||
Description | I have a very strange bug here: I extend both oxarticle and oxcategory with the same class, like 'extend' => array( 'oxarticle' => 'mymodule/core/mltobject', 'oxcategory' => 'mymodule/core/mltobject', ), In that class is a function like function dummy(){ return ''; } that works in both cases, because it only uses static or common functions from oxbase. If I activate that module, the frontend throws a lengthy sql error that some column can not be found. ------- Now when I copy the class to a identical second class and then extend like 'extend' => array( 'oxarticle' => 'mymodule/core/mltobject1', 'oxcategory' => 'mymodule/core/mltobject2', ), it works all fine! | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
@Developers: please check from the source code side and fix if needed. |
|
Well, you want an impossible thing, in plain php you can not define 2 different dummy classes oArticle = new dummy extends dummy_parent extends oxarticle oCategory = new dummy extends dummy_parent extends oxcategory |
|
I attached some spike example file dummy.php with columns ... |
|
http://stackoverflow.com/questions/561729/can-the-diamond-problem-be-really-solved |