Title: PHP Warning from function.php
Last modified: August 22, 2016

---

# PHP Warning from function.php

 *  [codecmoments](https://wordpress.org/support/users/codecmoments/)
 * (@codecmoments)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-from-functionphp/)
 * Hi,
 * I’ve been receiving an error via the hosting log file that states:
 * PHP Warning: array_push() expects parameter 1 to be array, null given in /home/
   sites/codecmoments.com/public_html/wp-content/themes/gamepress/functions.php 
   on line 13
 * This appears to be this section of code in the theme:
 * // Set the content width
    if ( ! isset( $content_width ) ) $content_width = 598;/*
   pixels */
 * function myfeed_request($qv) {
    if (isset($qv[‘feed’]) && !isset($qv[‘post_type’]))
   $qv[‘post_type’] = get_post_types($args = array( ‘public’ => true, ‘_builtin’
   => false )); array_push($qv[‘post_type’],’post’); return $qv; } add_filter(‘request’,‘
   myfeed_request’);
 * Specifically line 13:
 * array_push($qv[‘post_type’],’post’);
 * Any ideas on why this would generate an error? The hosting is suggesting this
   might be contributing to a recent 500 Internal Server error, though after 18 
   months of use it’s the first time it’s cropped up.
 * Thanks for any advice/help you can give.

The topic ‘PHP Warning from function.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/gamepress/1.0.5/screenshot.png)
 * GamePress
 * [Support Threads](https://wordpress.org/support/theme/gamepress/)
 * [Active Topics](https://wordpress.org/support/theme/gamepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/gamepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/gamepress/reviews/)

## Tags

 * ["internal server error"](https://wordpress.org/support/topic-tag/internal-server-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 0 replies
 * 1 participant
 * Last reply from: [codecmoments](https://wordpress.org/support/users/codecmoments/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-from-functionphp/)
 * Status: not resolved