PHP Fatal error: Can't use function return value in write context in /sites/all/modules/opcache/opcache.admin.inc on line 32

It seems fixed if you use this code:

  $trimmed = trim($form_state['values']['opcache_backends']);
  if (!empty($trimmed)) {
    $backends = preg_split("/\r\n|\n|\r/", $form_state['values']['opcache_backends']);
  }
CommentFileSizeAuthor
#1 can_t_use_function-2355395-1.patch1.65 KBlegolasbo

Comments

legolasbo’s picture

Status: Active » Needs review
StatusFileSize
new1.65 KB

I can confirm the bug. Attached patch fixes it.

Anonymous’s picture

Status: Needs review » Fixed

Fixed on Github. After promoting this from the sandbox, there was an issue with the D.O. repo that I am currently waiting on to be resolved, so I currently cannot push the fix to D.O.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.