php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /proc/self/root/var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/ext/tidy/tests/ |
| files >> //proc/self/root/var/www/html/sub/images/Rm19_symconf/root/php-7.1.11/ext/tidy/tests/027.phpt |
--TEST--
Bug: tidy segfaults with markup=false
--SKIPIF--
<?php if (!extension_loaded('tidy')) die('skip'); ?>
--FILE--
<?php
// bug report from http://sf.net/tracker/?func=detail&atid=390963&aid=1641868&group_id=27659
abstract class BaseClass {
private static $tidyconfig;
public function __construct() {
$this->tidyconfig = array(
'indent' => false,
'clean' => true,
'merge-divs' => false,
'quote-marks' => true,
'drop-empty-paras' => false,
'markup' => false,
'output-xhtml' => true,
'wrap' => 0);
}
abstract public function run();
public function getURL($url) {
$data = "awerawer"; // in my code, $data is downloaded from a site
$tidy = new tidy;
$tidy->parseString($data, $this->tidyconfig, 'utf8');
$tidy->cleanRepair();
return $tidy;
}
}
class ChildClass extends BaseClass {
public function __construct() {
parent::__construct();
}
public function run() {
$result = $this->getURL('awer');
if ($result === null) {
echo "\tError:\n";
}
var_dump((string)$result);
}
}
$instance = new ChildClass();
$instance->run();
?>
--EXPECT--
string(0) ""
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`