$query[‘ver’] isn’t always set. That generates notices when debugging is on:
Notice: Undefined index: ver in […]/hide-generator-version.php on line 20
The fix is simple. Just use isset():
if ( isset($query[‘ver’]) && $query[‘ver’] === $wp_version ) {
]]>