Title: [Plugin: WordPress Wiki] Call to undefined function array_fill_keys()
Last modified: August 19, 2016

---

# [Plugin: WordPress Wiki] Call to undefined function array_fill_keys()

 *  [D’Arcy Norman](https://wordpress.org/support/users/dnorman/)
 * (@dnorman)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-wordpress-wiki-call-to-undefined-function-array_fill_keys/)
 * After updating to version 0.6, I get this error (showing up in the apache error
   logs) when I try to edit a wiki page:
 * `PHP Fatal error: Call to undefined function array_fill_keys() in /path/to/wordpress/
   wp-content/plugins/wordpress-wiki/wordpress-wiki.php on line 701`
 * I’ve commented out that line for now, but am worried that will bork ownership
   of edits.
 * Looks like array_fill_keys() requires PHP 5.2 or greater – any chance of a back
   port for those still having to run lesser versions of PHP? The server I use is
   still running PHP Version 5.1.6

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [NHL23](https://wordpress.org/support/users/nhl23/)
 * (@nhl23)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-wordpress-wiki-call-to-undefined-function-array_fill_keys/#post-1037430)
 * I see it works as good as their shopping cart.
 *  [fkho](https://wordpress.org/support/users/fkho/)
 * (@fkho)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-wordpress-wiki-call-to-undefined-function-array_fill_keys/#post-1037531)
 * Maybe it’s late but…
 * You could add this function on the top of wordpress-wiki.php:
 *     ```
       function array_fill_keys($target, $value = '') {
           if(is_array($target)) {
               foreach($target as $key => $val) {
                   $filledArray[$val] = is_array($value) ? $value[$key] : $value;
               }
           }
           return $filledArray;
       }
       ```
   
 * Copied from [php manual](http://php.net/manual/en/function.array-fill-keys.php)
   and works fine for me.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WordPress Wiki] Call to undefined function array_fill_keys()’
is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [fkho](https://wordpress.org/support/users/fkho/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-wordpress-wiki-call-to-undefined-function-array_fill_keys/#post-1037531)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
