Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
343 views
in Q2A Core by

Hi ,

Several months ago I deactivated "Extra fields"in user profile , that  when  I was useing v-1.8.6. Now with v-1.8.8 I can't reactivate it again , when I Click on Add new field , page closed and I get an error message :

 PHP Fatal error:  Uncaught ValueError: max(): Argument #1 ($value) must contain at least one element in /home1/xxxxxx/public_html/xxxxx/qa-include/pages/admin/admin-userfields.php:156

Stack trace:

#0 /home1/xxxxxx/public_html/xxxx/qa-include/pages/admin/admin-userfields.php(156): max(Array)

#1 /home1/xxxxxx/public_html/xxxx/qa-include/app/page.php(183): require('/home1/xxxxxx...')

#2 /home1/xxxxxx/public_html/xxxxt/qa-include/qa-page.php(47): qa_get_request_content()

#3 /home1/xxxxxx/public_html/xxxx/qa-include/qa-index.php(189): require('/home1/xxxxxx...')

#4 /home1/xxxxxx/public_html/xxxx/index.php(27): require('/home1/xxxxxx...')

#5 {main}

  thrown in /home1/xxxxxx/public_html/xxxxt/qa-include/pages/admin/admin-userfields.php on line 156

Q2A version: 1.8.8

1 Answer

+2 votes
by
selected by
 
Best answer

It is actually a PHP8 issue. Just check this pull request and update your code.

by
I modified the code as per your directions, now everything is back as normal.
Thank you very much Pupi. ✨
...