4

Is there any way to initialize a stdClass? Code is simple

    $productOrCategory  =   new stdClass();
    $productOrCategory->stockFutureDays = 0;
    $productOrCategory->stockFutureDate = date('ymd');

but im getting Fatal error: Class 'Craft\stdClass' not found in Controller.php on line 63
and line 63 is the first line i added as code.

7

Solution was to call

$productOrCategory  =   new \stdClass();
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.