Title: [Plugin: HookPress] Fatal error: Call to undefined function: array_intersect_key()
Last modified: August 19, 2016

---

# [Plugin: HookPress] Fatal error: Call to undefined function: array_intersect_key()

 *  Resolved [danhixon](https://wordpress.org/support/users/danhixon/)
 * (@danhixon)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/)
 * Hookpress looks great! (esp. since I don’t like php) – I just can’t get it to
   work.
 * Fatal error: Call to undefined function: array_intersect_key() in /nfs/c02/h05/
   mnt/15692/domains/blog.spokt.com/html/wp-content/plugins/hookpress/includes.php
   on line 173
 * I set up this hook and tried to publish:
 * hook URL fields
    ON action: publish_post [http://spokt.com/blog_update](http://spokt.com/blog_update)
   post_url [delete]
 * I’d appreciate any help, thanks!

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

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/#post-1332383)
 * Ah, so array_intersect_key requires PHP 5.1… I guess you aren’t using 5.1?
 * I probably could get away without that function, or recreating it… maybe in a
   future release.
 *  Thread Starter [danhixon](https://wordpress.org/support/users/danhixon/)
 * (@danhixon)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/#post-1332388)
 * Apparently not: 4.4.8
 * I’ll see what it would take to upgrade.
 * Thanks for the quick reply!
 *  Thread Starter [danhixon](https://wordpress.org/support/users/danhixon/)
 * (@danhixon)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/#post-1332391)
 * I added this to the include.php file:
 *     ```
       if (!function_exists('array_intersect_key'))
       {
         function array_intersect_key($isec, $keys)
         {
           $argc = func_num_args();
           if ($argc > 2)
           {
             for ($i = 1; !empty($isec) && $i < $argc; $i++)
             {
               $arr = func_get_arg($i);
               foreach (array_keys($isec) as $key)
               {
                 if (!isset($arr[$key]))
                 {
                   unset($isec[$key]);
                 }
               }
             }
             return $isec;
           }
           else
           {
             $res = array();
             foreach (array_keys($isec) as $key)
             {
               if (isset($keys[$key]))
               {
                 $res[$key] = $isec[$key];
               }
             }
             return $res;
           }
         }
       }
       ```
   
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/#post-1332394)
 * Cool. 🙂

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

The topic ‘[Plugin: HookPress] Fatal error: Call to undefined function: array_intersect_key()’
is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-hookpress-fatal-error-call-to-undefined-function-array_intersect_key/#post-1332394)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
