Title: PHP 8.1 errors
Last modified: December 6, 2022

---

# PHP 8.1 errors

 *  Resolved [mercurydan](https://wordpress.org/support/users/mercurydan/)
 * (@mercurydan)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/)
 * Im getting errrors in my error logs. I think it has something to do with us upgrading
   to PHP 8.1.
 *     ```
       2022-12-06T07:13:31+00:00 CRITICAL Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in public_html/wp-content/plugins/zotpress/lib/shortcode/shortcode.request.php:365
       Stack trace:
       #0 public_html/wp-includes/class-wp-hook.php(308): Zotpress_shortcode_request('')
       #1 public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
       #2 public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
       #3 public_html/wp-admin/admin-ajax.php(203): do_action('wp_ajax_nopriv_...')
       #4 {main}
         thrown in public_html/wp-content/plugins/zotpress/lib/shortcode/shortcode.request.php on line 365
       ```
   

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/php-8-1-errors-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-8-1-errors-3/page/2/?output_format=md)

 *  [net-buoy](https://wordpress.org/support/users/net-buoy/)
 * (@net-buoy)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16266992)
 * App does not support php 8.x yet.
 *  Thread Starter [mercurydan](https://wordpress.org/support/users/mercurydan/)
 * (@mercurydan)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16278903)
 * PHP 7.4 is not supported for security updates anymore, so I have to upgrade to
   PHP 8.
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16282984)
 * Hi
    I’m not a PHP expert, but I managed to run the existing plug-in through an
   updater app (Rector) to bring it to PHP 8.
 * I’ve set up a test site on my local machine and it seems to work there under 
   PHP 8.0.8.
 * I make no guarantees and can’t offer support, but if you’d like to try this version
   and see, here’s the [download link](https://os5.mycloud.com/action/share/8c75d034-048b-4efd-b6ab-f9ae26db5eda)(
   from my personal NAS cloud).
 * Let us know how you fare!
 *  [net-buoy](https://wordpress.org/support/users/net-buoy/)
 * (@net-buoy)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16283033)
 * [@kfeuerherm](https://wordpress.org/support/users/kfeuerherm/) i forwarded this
   by email direct to Katie as well – hopefully this will get us over the current
   hump?
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16283036)
 * [@net-buoy](https://wordpress.org/support/users/net-buoy/) As did I. Fingers 
   crossed!!
 * (If you’re stuck, you’ve got nothing to lose trying it… I’d appreciate knowing
   how it goes, as I’ve not upgraded my sites to PHP 8 yet. Also, past experience
   suggests Katie has limited time so it could be a while.)
 *  Plugin Author [Katie](https://wordpress.org/support/users/kseaborn/)
 * (@kseaborn)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16283235)
 * Yes – I’m on semi-hiatus, as per the front page, just updating a couple times
   a year. I’ve got zero time and this is a free project with no pay or job prospects
   or kudos or anything in it for me except “this is something the academic community
   needs and/or finds useful.” So tech savvy people can jump in. Not sure when I’ll
   have time next.
 *  [net-buoy](https://wordpress.org/support/users/net-buoy/)
 * (@net-buoy)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16283360)
 * I have posted to zotero forum (see separate thread) and will try to see what 
   [@kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)’s tweaks do to
   my install
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16283368)
 * Thanks. Maybe post the link to the provisional code in your Zotero form post?
 * Good luck with the testing.
 *  [Mark](https://wordpress.org/support/users/codeispoetry/)
 * (@codeispoetry)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16336085)
 * In case anyone is interested what [@kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)’
   s patched version looks like, here is a diff shown in a quick [zotpress fork on github](https://github.com/mdingemanse/zotpress_fork/pull/1/commits/0a7f21e768d963bc1104470f65b2506ab861aef0).
   I have no intention of further developing this as I lack the JS/PHP programming
   skills but I wanted a quick way to see what this automatic tool would change.
 * Have to say I’m quite impressed by the [rector documentation](https://getrector.org/blog/2020/11/30/smooth-upgrade-to-php-8-in-diffs).
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16336094)
 * [@codeispoetry](https://wordpress.org/support/users/codeispoetry/) Thanks for
   this. I was wondering what people’s experience was with the patch. I’m not PHP-
   savvy either (given time I could learn, but time is the big issue!). I’m hoping
   that this will work for us and that if we have sufficient positive feedback/lack
   of negative we might get [@kseaborn](https://wordpress.org/support/users/kseaborn/)
   to post it.
 * Fingers crossed!!
 *  Plugin Author [Katie](https://wordpress.org/support/users/kseaborn/)
 * (@kseaborn)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16336578)
 * Hi all — this week is Zotpress week for me, so I’m looking into the patch atm.
 *  Plugin Author [Katie](https://wordpress.org/support/users/kseaborn/)
 * (@kseaborn)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16337396)
 * I used the code posted by [@codeispoetry](https://wordpress.org/support/users/codeispoetry/)
   and [@kfeuerherm](https://wordpress.org/support/users/kfeuerherm/). I had to 
   make several changes due to hidden issues here and there. I’ve tested in PHP 
   8.0.8 and WP 6.1.1 on my local machine. I’ve posted a preview below; does anyone
   want to try it (just to be sure) before release (7.3.2)?
 * [https://github.com/aspirelab/zotpress](https://github.com/aspirelab/zotpress)
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16338760)
 * Unfortunately this is the one week (or more) of total unavailability at my end
   as term starts next week and ‘thanks’ to a new vision issue which began last 
   term, staying on top of my ball has become a real issue.
 * I did some tests when I did the conversion and all worked for me, so I think 
   I’ll have to take it on faith that the extra adjustments will be ok. In the unlikely
   event that I can find the time to look at it, **are those changes clearly marked**?
 * Next point: I understand the semi-hiatus situation so no criticism–but we probably
   should be finding a way out of that. As noted a few times, I never learned PHP(
   I belong to the by-gone era of B programming and the like but have tried to update
   myself as necessary to my immediate work) but would consider looking at it after
   term end (i.e., April and beyond) though I must note that I’ll be hosting an 
   international conference in June as well. But if I can even reach a level of 
   having a general sense of what’s going on that would be helpful, as there are
   issues I’ve noticed beyond the PHP version which I’d be interested in looking
   into.
 * So… short version: will try to get more up to speed in April and beyond and we’ll
   see how that goes. In the meantime, hoping our combined changes will see us through.
 *  Plugin Author [Katie](https://wordpress.org/support/users/kseaborn/)
 * (@kseaborn)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16339809)
 * [@kfeuerherm](https://wordpress.org/support/users/kfeuerherm/) Thanks for checking
   in. Let’s see if others can check it out. I’ve done my normal thorough testing
   on my local machine with 10s of examples of all the shortcodes, live version 
   and testing, etc. and it’s working for me in PHP 8, so I may just release it 
   this weekend, as beyond that I can’t guarantee when I can work on Zotpress again.
 *  [kfeuerherm](https://wordpress.org/support/users/kfeuerherm/)
 * (@kfeuerherm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/#post-16339815)
 * No worries, Katie. As I say, I’ll see what I can do come the intersession. I 
   have an interest in such things, anyway. It’s just between this, and Swift, and
   ANTLR, and Grammatical Framework, and… 🙂 I’m sure you know exactly what I mean.
 * Thanks for taking the time to test it. It worked for me, but I don’t use all 
   the features. Deeply appreciated.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/php-8-1-errors-3/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-8-1-errors-3/page/2/?output_format=md)

The topic ‘PHP 8.1 errors’ is closed to new replies.

 * ![](https://ps.w.org/zotpress/assets/icon-256x256.png?rev=1995512)
 * [Zotpress](https://wordpress.org/plugins/zotpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zotpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zotpress/)
 * [Active Topics](https://wordpress.org/support/plugin/zotpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zotpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zotpress/reviews/)

## Tags

 * [development](https://wordpress.org/support/topic-tag/development/)
 * [error logs](https://wordpress.org/support/topic-tag/error-logs/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [testing](https://wordpress.org/support/topic-tag/testing/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * 21 replies
 * 5 participants
 * Last reply from: [Katie](https://wordpress.org/support/users/kseaborn/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-8-1-errors-3/page/2/#post-16364525)
 * Status: resolved