Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/08/2005, 22:29
Avatar de derkenuke
derkenuke
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: self.location.href
Mensajes: 2.665
Antigüedad: 20 años, 5 meses
Puntos: 45
Warning: Call-time pass-by-reference has been deprecated

Hola foro.

Cambie algo de mi wordpress, necesito pasar una variable por referencia en vez de por valor a una funcion.

La funcion es
Código PHP:
function wp_get_archives($args ''$c=0) {
    
parse_str($args$r);
    if (!isset(
$r['type'])) $r['type'] = '';
    if (!isset(
$r['limit'])) $r['limit'] = '';
    if (!isset(
$r['format'])) $r['format'] = 'html';
    if (!isset(
$r['before'])) $r['before'] = '';
    if (!isset(
$r['after'])) $r['after'] = '';
    if (!isset(
$r['show_post_count'])) $r['show_post_count'] = false;
    
get_archives($r['type'], $r['limit'], $r['format'], $r['before'], $r['after'], $r['show_post_count'], &$c);

Y la llamo asi
Código PHP:
$contador=0;
wp_get_archives("type=monthly&format=menu", &$contador); 
La mando alertar con js una vez la modifico por dentro de las funciones y si que cambia su valor, sin embargo me aparece el warning ese:

Código HTML:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in C:\SERVIDOR\wordpress\wp-includes\template-functions-general.php on line 264
Qué se supone que quiere decir? Como puedo arreglarlo sin tocar el INI? Esta bien declarada la funcion?

__________________
- Haz preguntas inteligentes, y obtendrás más y mejores respuestas.
- Antes de postearlo Inténtalo y Búscalo.
- Escribe correctamente tus mensajes.