nullpot / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

error_reporting(E_ALL | E_STRICT) gives warnings #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Source:

<?php

error_reporting(E_ALL | E_STRICT);

require_once '../system/phpQuery-0.9.5.343/phpQuery/phpQuery.php';

$doc =
phpQuery::newDocument('<html><head><title/></head><body></body></html>');
pq('title')->text("hello!");
$h1 = pq('<h1/>')->text('hello!');
pq('body')->append($h1);
$code = pq('<?php echo htmlspecialchars($test) ?>');
pq('body')->append($code);

$field = pq('<input name="name"/>');
$field->val('test');
pq('body')->append($field);

echo $doc;

?>

2. load the php page

What is the expected output? What do you see instead?

The input has the expected value, however because of the strict mode there
also is a warning/error:

Strict standards: Non-static method phpQueryObject::whois() should not be
called statically

What version of the product are you using? On what operating system?

phpQuery-0.9.5.343 on Ubuntu

Please provide any additional information below.

error_reporting(E_ALL | E_STRICT);

When E_STRICT is not used, no error/warning appearts.

Original issue reported on code.google.com by sanderh...@gmail.com on 2 Mar 2009 at 1:31

GoogleCodeExporter commented 9 years ago
Already fixed in SVN. Anyway thx for report.

BTW dont do pq('<?php echo htmlspecialchars($test) ?>')
do ->php('echo htmlspecialchars($test)') or phpQuery::php('echo 
htmlspecialchars($test)')

Next time please provide full error message if possible (file & line no).

Original comment by tobiasz....@gmail.com on 3 Mar 2009 at 11:00