fix: disable error for loadHTML because no html5 support by default in PHP
This commit is contained in:
parent
84baa1d098
commit
547662f97c
|
@ -9,6 +9,9 @@ services:
|
||||||
- ./www:/var/www/html
|
- ./www:/var/www/html
|
||||||
- ./docker-nginx-conf/default.conf:/etc/nginx/conf.d/default.conf
|
- ./docker-nginx-conf/default.conf:/etc/nginx/conf.d/default.conf
|
||||||
php-fpm:
|
php-fpm:
|
||||||
image: php:8-fpm
|
image: php:development
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: php.Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ./www:/var/www/html
|
- ./www:/var/www/html
|
||||||
|
|
4
php.Dockerfile
Normal file
4
php.Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM php:8-fpm
|
||||||
|
|
||||||
|
# Use the default production configuration
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
|
@ -401,7 +401,7 @@ function prepareContent( $file, $sourcePath )
|
||||||
$content = file_get_contents( $file );
|
$content = file_get_contents( $file );
|
||||||
|
|
||||||
foreach ( $LOADER['ARCHIVARIX_INCLUDE_CUSTOM'] as $includeCustom ) {
|
foreach ( $LOADER['ARCHIVARIX_INCLUDE_CUSTOM'] as $includeCustom ) {
|
||||||
if ( $includeCustom['FILE'] && $includeCustom['KEYPHRASE'] ) {
|
if ( isset($includeCustom['FILE']) && $includeCustom['FILE'] && isset($includeCustom['KEYPHRASE']) && $includeCustom['KEYPHRASE'] ) {
|
||||||
global $includeRule;
|
global $includeRule;
|
||||||
$includeRule = $includeCustom;
|
$includeRule = $includeCustom;
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -424,9 +424,9 @@ function prepareContent( $file, $sourcePath )
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = preg_replace( '~' . $includeCustom['KEYPHRASE'] . '~is', $includedContent, $content, $includeCustom['LIMIT'] );
|
$content = preg_replace( '~' . $includeCustom['KEYPHRASE'] . '~is', $includedContent, $content, $includeCustom['LIMIT'] );
|
||||||
} else if ( $includeCustom['OPERATION'] && $includeCustom['XPATH'] ) {
|
} else if ( isset($includeCustom['OPERATION']) && $includeCustom['OPERATION'] && isset($includeCustom['XPATH']) && $includeCustom['XPATH'] ) {
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
$doc->loadHTML($content);
|
$doc->loadHTML($content, LIBXML_NOERROR);
|
||||||
$xpath = new DOMXpath($doc);
|
$xpath = new DOMXpath($doc);
|
||||||
$elementsToChange = $xpath->query($includeCustom['XPATH']);
|
$elementsToChange = $xpath->query($includeCustom['XPATH']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user