facebook / facebook/hhvm

xinclude doesn't handle encoded urls

Abierto
#4,972 0 comentarios 0 reacciones 0 asignados Ver en GitHub
php5 incompatibility probably easy
Lenguaje dominante
C++
Estrellas
18.7k
Forks
3.1k
Merge medio
1 h 47 min
PR fusionados (30 d)
2

Descripción

In php, if you want to use an xinclude to a file containing whitespace you need to encode the filename/path using url encoding. So to include "test include.xml" one needs to use ``.
In hhvm this triggers an error (with and without encoding)

given:

> "test include.xml"
>
> ``` xml
>
>
> test include
>
> ```
>
> "main.xml"
>
> ``` xml
>
>
>
>
> ```

The script:

``` php
load(__DIR__ . '/main.xml');
$doc->xinclude();
echo $doc->saveXML();
```

produces with php

``` xml


test include

```

and a warning with hhvm (and the x:include doesn't get executed)

``` xml
I/O warning : failed to load external entity "/path/test+include.xml"
/path/main.xml:3: element include: XInclude error : could not load /path/test+include.xml, and no fallback was found

```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.