-
Couldn't load subscription status.
- Fork 8k
Tidy config strenghtening #18751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tidy config strenghtening #18751
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,12 +7,42 @@ tidy | |||||
| --FILE-- | ||||||
| <?php | ||||||
| $buffer = '<html></html>'; | ||||||
| $config = array('bogus' => 'willnotwork'); | ||||||
| $config = ['bogus' => 'willnotwork']; | ||||||
|
|
||||||
| $tidy = new tidy(); | ||||||
| var_dump($tidy->parseString($buffer, $config)); | ||||||
|
|
||||||
| try { | ||||||
| $tidy->parseString($buffer, $config); | ||||||
| } catch (\ValueError $e) { | ||||||
| echo get_class($e) . ": " . $e->getMessage(), PHP_EOL; | ||||||
| } | ||||||
|
|
||||||
| $config = ['neither']; | ||||||
| try { | ||||||
| $tidy->parseString($buffer, $config); | ||||||
| } catch (\TypeError $e) { | ||||||
| echo $e->getMessage(), PHP_EOL; | ||||||
|
||||||
| echo $e->getMessage(), PHP_EOL; | |
| echo $e::class, ": ", $e->getMessage(), PHP_EOL; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo $e->getMessage(), PHP_EOL; | |
| echo $e::class, ": ", $e->getMessage(), PHP_EOL; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo $e->getMessage(), PHP_EOL; | |
| echo $e::class, ": ", $e->getMessage(), PHP_EOL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either consistent use of
.or,