Hi Jim!
I know you posted this quite a while back, but I just recently had the server upgrade to a newer version of PHP and I received the same issues.
Just like you, I saw this post where Josh made a few recommendations for a solution that involved some PHP. Now, I’m no PHP expert, but I did my best to follow his instructions and it seems like things are working now. I thought I’d pass along the knowledge with the hope that it would help someone else.
Here’s what I did:
- Backup wpfib.php, options.php, and /includes/options.php
- Open wpfib.php with an editing tool (like Notepad++)
- Search for an instance of “&$”
- If it is included in a function call, delete the “&” from there, find the function declaration, and place the “&” in the declaration.
- Repeat. Then open options.php and /includes/options.php and do the same.
For instance, in wpfib.php, you’ll see wpfib_init_options(&$atts)
in line 144 and function wpfib_init_options($atts){
in line 225. The first calls the function, the second defines what the function does. This is because the second one has the word “function” immediately before it. So, you simply delete that “&” from the first and place it in the second. The result is wpfib_init_options($atts)
and function wpfib_init_options(&$atts){
.
So really, all you’re doing is moving the “&”. Pretty easy right?
Now, there were functions where there were several attributes and different combinations of ampersands. For instance, I saw if (!wpfib_get_current_location(&$curdir_relpath, $repo_abspath, &$error_text))
in line 193. So I remembered that only the first and third attributes had the ampersand and went to the function call in line 829 function wpfib_get_current_location($curdir_relpath, $repo_abspath, $error_text)
and changed the ampersands. So the result was that line 193 became if (!wpfib_get_current_location($curdir_relpath, $repo_abspath, $error_text))
and line 829 became function wpfib_get_current_location(&$curdir_relpath, $repo_abspath, &$error_text)
I wasn’t sure of your coding ability so I tried to be as detailed as possible. All credit goes to Josh for his initial post that helped me solve this issue on my site. Hopefully this makes sense and will help you update your Smallerik plugin to be compatible with newer versions of PHP! ??