Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Problem z missing argument 2 for register_activation_hook()
Margos
post 25.05.2015, 20:17:35
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 29.12.2006

Ostrzeżenie: (0%)
-----


Przepraszam, odcień mojej zieloności w php jest tym najbardziej rażącym po oczach.
W wordpressie (4.2.2) wyskakują mi takie błędy:
Warning: Missing argument 1 for register_activation_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 29 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 739
Warning: Missing argument 2 for register_activation_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 29 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 739
Warning: Missing argument 1 for register_deactivation_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 30 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 762
Warning: Missing argument 2 for register_deactivation_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 30 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 762
Warning: Missing argument 1 for register_uninstall_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 31 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 793
Warning: Missing argument 2 for register_uninstall_hook(), called in /home/virtualki/130388/wp-content/plugins/simple-picture-menu/index.php on line 31 and defined in /home/virtualki/130388/wp-includes/plugin.php on line 793

Bardzo proszę o pomoc, znalazłem na serwerze te dwa pliki, w wymienionych wyżej linijkach następuje:
- w pliku index.php:
register_activation_hook();
register_deactivation_hook();
register_uninstall_hook();

- w pliku plugin.php:
linijka 739 (i trzy następne):
function register_activation_hook($file, $function) {
$file = plugin_basename($file);
add_action('activate_' . $file, $function);
}
linijka 762:
function register_deactivation_hook($file, $function) {
$file = plugin_basename($file);
add_action('deactivate_' . $file, $function);
}
linijka 793:
function register_uninstall_hook( $file, $callback ) {
if ( is_array( $callback ) && is_object( $callback[0] ) ) {
_doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1' );
return;
}

Z góry dziękuję za wszelką pomoc i przepraszam, za laicki język.
Pozdrawiam
Go to the top of the page
+Quote Post
kartin
post 31.05.2015, 21:36:40
Post #2





Grupa: Zarejestrowani
Postów: 246
Pomógł: 79
Dołączył: 25.05.2010

Ostrzeżenie: (0%)
-----


Simple Picture Menu
Compatible up to: 3.6.1
Last Updated: 2013-9-10

Proponuję poszukać innej wtyczki, bo ta nie jest już rozwijana. Po 3.6.1 zostało wydanych 40 nowych wersji WordPressa. Jak bardzo chcesz tej używać to skasuj:
  1. register_activation_hook();
  2. register_deactivation_hook();
  3. register_uninstall_hook();
a powinno działać.


--------------------
Jeśli ten post pomógł to kliknij przycisk po lewej stronie.
Nie pomagam przez PW, GG, e-mail, faks, telegram, znaki dymne, ...
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 13.06.2024 - 01:49