Skip to content

Commit

Permalink
Fixed a fatal error showing on UBC Blogs where the function gets call…
Browse files Browse the repository at this point in the history
…ed early and did not pass enough parameters it needs. Error below

Uncaught ArgumentCountError: Too few arguments to function WPCaliperPlugin\\wp_caliper_wp_login(), 1 passed in /www_data/www/wp-includes/class-wp-hook.php on line 307 and exactly 2 expected in /www_data/www/wp-content/mu-plugins/wp-caliper/wp-caliper-event-hooks.php:446
  • Loading branch information
kelvin-xu committed Jul 21, 2022
1 parent 101b528 commit e2977d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-caliper-event-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function wp_caliper_add_attachment( $post_id ) {
* @param bool $user_login user login.
* @param \WP_USER $user WordPress user object.
*/
function wp_caliper_wp_login( $user_login, $user ) {
function wp_caliper_wp_login( $user_login = false, $user = false ) {
if ( empty( $user->ID ) ) {
return;
}
Expand Down

0 comments on commit e2977d8

Please sign in to comment.