I modified the default prestashop 1.5 newsletter module and made the following override of to the IdentityController
$this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('modifiednewsletter')->active);
So the checkbox would appear to set/unset newsletter subscription via the "my personal information" account link.
Everything works fine but with ini_set("display_errors", 1);
i still get the following php error on the personal info page
Notice: Trying to get property of non-object in /var/www/prestashop/controllers/front/IdentityController.php on line 135 Call Stack: 0.0001 646712 1.
line 135 of IdentityController.php is
$this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active);
When i comment out the line, the error goes away, but I really don't want to mess with the core files, can anyone tell me how to "unset" this variable through the override file?