View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005063 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2013-04-12 10:16 | 2013-04-16 12:58 |
Reporter | spoofer | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | random |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 4.7.5 / 5.0.5 | ||||
Summary | 0005063: PHP Fatal error due to missing method check in application/models/oxorderarticle.php | ||||
Description | After updating to Enterprise Edition 5.0.3_54408 sometimes we get the following error: PHP Fatal error: Call to a member function setValue() on a non-object in application/models/oxorderarticle.php on line 645 Reason is the missing method check which was implemented before. We used the following emergency patch to solve the problem (re-implementation of method_exists() call): Index: application/models/oxorderarticle.php =================================================================== diff -u -N -r58be538021119b4a1091f1b1836a47f471d71e11 -r79ce265c5a3cbfe26be35d12d883edafdce63257 --- application/models/oxorderarticle.php (.../oxorderarticle.php) (revision 58be538021119b4a1091f1b1836a47f471d71e11) +++ application/models/oxorderarticle.php (.../oxorderarticle.php) (revision 79ce265c5a3cbfe26be35d12d883edafdce63257) @@ -642,7 +642,11 @@ { if ( $this->oxorderarticles__oxstorno->value == 0 ) { $myConfig = $this->getConfig(); - $this->oxorderarticles__oxstorno->setValue( 1 ); + if(method_exists ($this->oxorderarticles__oxstorno, 'setValue')) { + $this->oxorderarticles__oxstorno->setValue( 1 ); + } else { + $this->oxorderarticles__oxstorno->value = 1; + } if ( $this->save() ) { $this->updateArticleStock( $this->oxorderarticles__oxamount->value, $myConfig->getConfigParam('blAllowNegativeStock') ); } | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||