Internal Link Building not working in PHP8? [The solution]
-
The Internal Link Plugin breaks when updating to PHP 8, and here is the fix I made (using ChatGPT):
You have to edit the file: internal_link_building.php
You’ll find it here:
/wp-content/plugins/internal-link-building-plugin/internal_link_building.php
Line 454 find this:
while (list($name, $ops) = each($keywords)) { if($name == 'keywords_time') continue; $case = ''; if($ops['case'] == 1) $case = ' checked="checked" '; $nofollow = ''; if($ops['nofollow'] == 1) $nofollow = ' checked="checked" '; $newwindow = ''; if($ops['newwindow'] == 1) $newwindow = ' checked="checked" '; $name = str_replace("'","'",stripslashes($name)); echo " <tr> <td><input type='text' style='width:90%;' value='$name' name='internal_link_building[$x][name]' /></td> <td><input type='text' style='width:90%;' value='$ops[url]' name='internal_link_building[$x][url]' /></td> <td><input type='text' value='$ops[times]' name='internal_link_building[$x][times]' size='4' /></td> <td><input type='text' value='$ops[between]' name='internal_link_building[$x][between]' size='4' /></td> <td><input type='text' value='$ops[before]' name='internal_link_building[$x][before]' size='4' /></td> <td><input type='text' value='$ops[after]' name='internal_link_building[$x][after]' size='4' /></td> <td><input type='checkbox' $case value='1' name='internal_link_building[$x][case]' /></td> <td><input type='checkbox' $nofollow value='1' name='internal_link_building[$x][nofollow]' /></td> <td><input type='checkbox' $newwindow value='1' name='internal_link_building[$x][newwindow]' /></td> </tr> "; $x++; }
Replace that code with this:
foreach ($keywords as $name => $ops) { if($name == 'keywords_time') continue; $case = ''; if($ops['case'] == 1) $case = ' checked="checked" '; $nofollow = ''; if($ops['nofollow'] == 1) $nofollow = ' checked="checked" '; $newwindow = ''; if($ops['newwindow'] == 1) $newwindow = ' checked="checked" '; $name = str_replace("'","'",stripslashes($name)); echo " <tr> <td><input type='text' style='width:90%;' value='$name' name='internal_link_building[$x][name]' /></td> <td><input type='text' style='width:90%;' value='{$ops['url']}' name='internal_link_building[$x][url]' /></td> <td><input type='text' value='{$ops['times']}' name='internal_link_building[$x][times]' size='4' /></td> <td><input type='text' value='{$ops['between']}' name='internal_link_building[$x][between]' size='4' /></td> <td><input type='text' value='{$ops['before']}' name='internal_link_building[$x][before]' size='4' /></td> <td><input type='text' value='{$ops['after']}' name='internal_link_building[$x][after]' size='4' /></td> <td><input type='checkbox' $case value='1' name='internal_link_building[$x][case]' /></td> <td><input type='checkbox' $nofollow value='1' name='internal_link_building[$x][nofollow]' /></td> <td><input type='checkbox' $newwindow value='1' name='internal_link_building[$x][newwindow]' /></td> </tr> "; $x++; }
Then save. And it should work again ??
- The topic ‘Internal Link Building not working in PHP8? [The solution]’ is closed to new replies.