Title: Problem with a plugin&#039;s php file
Last modified: August 19, 2016

---

# Problem with a plugin's php file

 *  [Preeminent](https://wordpress.org/support/users/preeminent/)
 * (@preeminent)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/)
 * Hey all,
    I was messing around with a wordpress plugin that adds modernizr.js
   to your blog. Well, I deleted the plugin off the server and then deleted the 
   plugin from the admin panel, in that order, so I don’t know if that is what is
   causing my issue or not. Anyway, I am getting this error thrown at me when you
   visit the site: “Warning: Missing argument 2 for rw_modernizr_nojs() in /homepages/
   6/d364289486/htdocs/wp-content/plugins/modernizr/modernizr.php on line 23 class
   =”home blog no-js”>”
 * I then thought to try and install the plugin again, which I did and is currently
   installed. It makes the site do what I need it to do in IE, but it’s still throwing
   the error.
 * I opened the php file for the plugin and here is what it looks like:
 *     ```
       function rw_modernizr() {		wp_deregister_script('modernizr'); // deregister
       		// wp_register_script( $handle, $src, $deps, $ver, $in_footer );
       		wp_register_script('modernizr', plugins_url('/js/modernizr-1.7.min.js', __FILE__), false, '1.7.0', false); // re register // false for not in footer
       		wp_enqueue_script('modernizr'); // load
       }
       add_action('init', 'rw_modernizr'); // init
   
       // add class no-js to body element since HTML element is not possible
       // no-js is required for modernizr to work
       add_filter('body_class','rw_modernizr_nojs');
       function rw_modernizr_nojs($classes, $class) {
       	// add 'my-class' to the $classes array
       	$classes[] = 'no-js';
       	// return the $classes array
       	return $classes;
       }
       ```
   
 * Can anyone help me out with this? Thanks in advance!
 * and btw, line 23 in the plugin’s php file is this:
    `function rw_modernizr_nojs(
   $classes, $class) {`

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

 *  [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * (@ramoonus)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049018)
 * I have released version 1.0.1 which fixes this problem
 *  Thread Starter [Preeminent](https://wordpress.org/support/users/preeminent/)
 * (@preeminent)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049165)
 * Hi Ramoonus, thank you for your reply. I just upgraded your plugin and it fixed
   Firefox, but internet explorer and safari are still showing the error! I’m getting
   kind of worried now, because the plugin is completely deactivated and deleted,
   yet the error is still there!Can you please assist me with getting rid of this?
 *  Thread Starter [Preeminent](https://wordpress.org/support/users/preeminent/)
 * (@preeminent)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049170)
 * Ok, so just in case anyone else ends up with this problem. I deactivated and 
   deleted the plugin. Then manually added modernizr into the head.php. This fixed
   the problem. Thanks though! Great idea! Hopefully your upgrade will prevent this
   from happening to others.
 *  [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * (@ramoonus)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049191)
 * this problem is not browser dependant
    might be due caching problems from your
   site and browser
 *  [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * (@ramoonus)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049192)
 * version 1.0.1 fixes the problem
    are you sure you updated?
 *  Thread Starter [Preeminent](https://wordpress.org/support/users/preeminent/)
 * (@preeminent)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049218)
 * Yes sir! I sure did. I deactivated and deleted the plugin. I then installed the
   updated version. The error was still there. For some reason, Firefox was not 
   showing the error. All other browsers were.
 *  [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * (@ramoonus)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049220)
 * its still there?
    im going to have another look at it
 *  [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * (@ramoonus)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049221)
 * i can only say it works for me
    using WP 3.1.3 (php 5.3)

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

The topic ‘Problem with a plugin's php file’ is closed to new replies.

## Tags

 * [html5](https://wordpress.org/support/topic-tag/html5/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 8 replies
 * 2 participants
 * Last reply from: [Ramoonus](https://wordpress.org/support/users/ramoonus/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/problem-with-a-plugins-php-file/#post-2049221)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
