PHP - fallo de strpos

<<>>
 
Vista:
sin imagen de perfil

fallo de strpos

Publicado por Pablo (20 intervenciones) el 11/06/2025 17:07:23
Tengo la siguiente línea de código: $org_buf = substr($org_buf, 0, strpos($org_buf, 0)); funciona pero me da el siguiente mensaje de error: PHP Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in.

¿Como lo soluciono?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

fallo de strpos

Publicado por Pablo (20 intervenciones) el 11/06/2025 19:01:34
Arreglado: $org_buf = substr($org_buf, 0, strpos($org_buf, "\0"));
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar