We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e070e67 commit fe329daCopy full SHA for fe329da
bashquote
@@ -101,9 +101,10 @@ class BashOrgQuotes extends Quotes {
101
*/
102
function fetchQuotes() {
103
libxml_use_internal_errors(TRUE);
104
- $doc = DOMDocument::loadHTMLFile("http://bash.org/?random1");
+ $doc = new DOMDocument;
105
+ $doc->loadHTMLFile("http://bash.org/?random1");
106
$xpath = new DOMXPath($doc);
- $elements = $xpath->query('//p[@class="qt"]');
107
+ $elements = $xpath->query('//p[@class="qt"]');
108
$quotes = array();
109
foreach ($elements as $element) {
110
$quote = $element->textContent;
0 commit comments