Broken jQuery Dependency for strong-passwords.js!
-
Hi,
I would like to update this plugin on one of my customers blogs. I would like to update to the most recent version (4.0.5). However, I ran into a bug that produces a javascript error on the wordpress login page.
ReferenceError: jQuery is not defined
jQuery( document ).ready( function () { …… in wp-content/plugins/better-wp-security/modules/free/strong-passwords/js/strong-passwords.js
The script depends on jQuery to be available on the site, but the actual definition of this dependency seems to be broken.
In better_wp_secutiry/modules/free/strong-passwords/js/class.itsec-strong-passwords.php, line 117 looks like this:
wp_enqueue_script( 'itsec_strong_passwords', $this->module_path . 'js/strong-passwords.js', 'jquery', $itsec_globals['plugin_build'] );… while actually the dependency parameter should be an array, according to WordPress documentation. This works:
wp_enqueue_script( 'itsec_strong_passwords', $this->module_path . 'js/strong-passwords.js', array('jquery'), $itsec_globals['plugin_build'] );Please fix this.
Regards,
Ruwen
The topic ‘Broken jQuery Dependency for strong-passwords.js!’ is closed to new replies.