FIX fixing syntax problem on php 7
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ae3cc383ba
commit
1bd97997b5
|
|
@ -119,12 +119,11 @@ function apply_footnotes_urls_to_content($content)
|
||||||
@$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
@$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||||
|
|
||||||
$links = $dom->getElementsByTagName('a');
|
$links = $dom->getElementsByTagName('a');
|
||||||
phpinfo();
|
|
||||||
foreach ($links as $key => $link) {
|
foreach ($links as $key => $link) {
|
||||||
// write_log($key);
|
|
||||||
if ($link->hasAttribute('class') && strpos($link->getAttribute('class'), 'footnote-reference') !== false) {
|
if ($link->hasAttribute('class') && strpos($link->getAttribute('class'), 'footnote-reference') !== false) {
|
||||||
$link->setAttribute('id', 'footnote-' . $key + 1);
|
$link->setAttribute('id', 'footnote-' . ($key + 1));
|
||||||
write_log($link->getAttribute('id'));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user