this php row
if ($this->config->get('refprogram_sharing_enable') && !empty($this->config->get('refprogram_sharing_links'))) {
returns error message Fatal error: Can't use method return value in write context
this php row
if ($this->config->get('refprogram_sharing_enable') && !empty($this->config->get('refprogram_sharing_links'))) {
returns error message Fatal error: Can't use method return value in write context
If you are using a version of PHP older than 5.5, you can only use variables within empty
, and not method calls, otherwise it will throw the error you have received.
A solution would be to calculate the return value first, for example:
$links = $this->config->get('refprogram_sharing_links');
if ($this->config->get('refprogram_sharing_enable') && !empty($links)) {
Depending on the output of your get
method, you could also try
&& $this->config->get('refprogram_sharing_links') !== false
Hard to tell if this would work without seeing the rest of your code, though.