Skip to content

Commit c306a00

Browse files
committed
Merge pull request theseer#8 from sebastianbergmann/master
PHP 5.4 Compatibility
2 parents 6af64f6 + 79c6a0d commit c306a00

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/fDOMDocument.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,14 @@ public function loadXML($source, $options = LIBXML_NONET) {
149149
* Wrapper to DOMDocument loadHTMLFile with exception handling.
150150
* Returns true on success to satisfy the compatibilty of the original DOM Api
151151
*
152-
* @param string $fname html file to load
152+
* @param string $fname html file to load
153+
* @param integer $options Options bitmask (@see DOMDocument::loadHTMLFile)
153154
*
154155
* @return boolean
155156
*/
156-
public function loadHTMLFile($fname) {
157+
public function loadHTMLFile($fname, $options = NULL) {
157158
$this->xp = null;
158-
$tmp = @parent :: loadHTMLFile($fname);
159+
$tmp = @parent :: loadHTMLFile($fname, $options);
159160
if (!$tmp) {
160161
throw new fDOMException("loading html file '$fname' failed", fDOMException::LoadError);
161162
}
@@ -166,13 +167,14 @@ public function loadHTMLFile($fname) {
166167
* Wrapper to DOMDocument loadHTML with exception handling
167168
* Returns true on success to satisfy the compatibilty of the original DOM Api
168169
*
169-
* @param string $source html source code
170+
* @param string $source html source code
171+
* @param integer $options Options bitmask (@see DOMDocument::loadHTML)
170172
*
171173
* @return boolean
172174
*/
173-
public function loadHTML($source) {
175+
public function loadHTML($source, $options = NULL) {
174176
$this->xp = null;
175-
$tmp = @parent :: loadHTML($source);
177+
$tmp = @parent :: loadHTML($source, $options);
176178
if (!$tmp) {
177179
throw new fDOMException('parsing html string failed', fDOMException::ParseError);
178180
}

0 commit comments

Comments
 (0)