wp-media / wp-media/backwpup

Deprecated: Non-static method BackWPup_Admin::admin_css() should not be called statically in /var/www/html/wp-includes/class-wp-hook.php on line 292

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
95
Forks
46
PR merge metrics
No merged PRs in 30d

Description

I'm not sure what this is. There's a "banner" across the top of my localhost dev site. It just appeared in the last two weeks.

Here's the message again:

Deprecated: Non-static method BackWPup_Admin::admin_css() should not be called statically in /var/www/html/wp-includes/class-wp-hook.php on line 292

Except for naming the backup and selecting the local folder to back up to and making sure the permission are writable for that directory, all the settings remain at default.

Here's the whole programming thing from class-wp-hook.php from line 269 to line 305:

`public function apply_filters( $value, $args ) {
if ( ! $this->callbacks ) {
return $value;
}

	$nesting_level = $this->nesting_level++;

	$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
	$num_args                           = count( $args );

	do {
		$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
		$priority                                 = $this->current_priority[ $nesting_level ];

		foreach ( $this->callbacks[ $priority ] as $the_ ) {
			if ( ! $this->doing_action ) {
				$args[0] = $value;
			}

			// Avoid the array_slice() if possible.
			if ( 0 == $the_['accepted_args'] ) {
				$value = call_user_func( $the_['function'] );
			} elseif ( $the_['accepted_args'] >= $num_args ) {
				$value = call_user_func_array( $the_['function'], $args );
			} else {
				$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
			}
		}
	} while ( false !== next( $this->iterations[ $nesting_level ] ) );

	unset( $this->iterations[ $nesting_level ] );
	unset( $this->current_priority[ $nesting_level ] );

	$this->nesting_level--;

	return $value;
}`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported call in class-wp-hook.php and trace where BackWPup_Admin::admin_css() is registered as a callback. Check the plugin's admin CSS path and reproduce the notice in the reported WordPress/PHP environment; done means the deprecation message no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.