Fatal error: Illegal length modifier specified 'f' in s[np]printf call

Fatal error: Illegal length modifier specified 'f' in s[np]printf call

by Larry Elchuck -
Number of replies: 0

I ran into this issue when upgrading a Moodle 3.9.x site on inmotionhosting back in October (2020) and thought I had it resolved.  Upon attempting to do the weekly update to the latest weekly .git release, I receive the Update confirm page, followed by Server Checks page. Then the following fatal error is displayed upon hitting Continue:

Fatal error: Illegal length modifier specified 'f' in s[np]printf call in /home/myserverspace/public_html/moodle39/cache/locallib.php on line 113

In the past instance in October, deleting the localcache and cache folder contents in the moodledata folder and switching to php version 7.4 fixed the issue. This time, it's a no-go. I have been doing weekly updates every week between the last occurrence of this issue and now, and this is the first time I've encountered this issue since then.

I switched the theme from Adaptable to Boost, but that also made no difference. Other than not being able to upgrade, the site appears to. work fine for all non-admin users.

I also cloned the entire site to the latest Moodle 9.10.x version and the same error occurs.  It does update properly on a MAMP test server at my residence.

Ideas of things I could try would be appreciated.

Average of ratings: -