New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix warning: Undefined index: instance_id #8371
Conversation
WARNING: ...\piwik\core\SettingsPiwik.php(408): Notice - Undefined index: instance_id - Piwik 2.14.1 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
Weird, the |
if (!empty($instanceId)) { | ||
return $instanceId; | ||
$configGeneral = Config::getInstance()->General; | ||
if(isset($configGeneral['instance_id']) && !empty($configGeneral['instance_id'])){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to check isset
when using !empty
.
@mnapoli not with |
Ah right, then I would say it's a wontfix then. We use the error suppressor everywhere in Piwik. I'm not saying it's good, but removing it here because of xdebug (which shouldn't be installed or enabled in production) wouldn't make sense if we leave it everywhere else. |
@mnapoli i was developing a plugin and wanted to test it in development, therefor i need the Piwik installation. (I dont want to change my php.ini settings because of one project) But i know what thats only one place of many. |
Shouldn't we work towards removing all of the error suppression? So why not starting with this one? |
To remove all suppressions from the config it would be easiert to change this |
Makes sense. However the "scream" option is meant to achieve exactly what you get here, and currently So we get back to this point:
I wouldn't be against discussing that with pros and cons (and I'm not against removing TL/DR: before removing |
👍 for now, we don't need to remove the extras |
WARNING: ...\piwik\core\SettingsPiwik.php(408): Notice - Undefined index: instance_id - Piwik 2.14.1 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)