Reported by NonSecureUniqidUsageInspection : when calling \uniqid we should provide true as second parameter.
But was causing issues as the generated string could contain a dot, and this is used in CSS and JQuery selectors (for example a "my.id" cannot be used in #my.id selector)
So we're just replacing dots with hyphens !
Was discussed with @Molkobain in 0119f6c395
Remove dataprovider in \Combodo\iTop\Test\UnitTest\Integration\iTopModulesPhpVersionIntegrationTest::testITopModulesPhpVersion
The dataprovider was slow, and was very fragile because it contained much PHP code : as seen in 2221e05 when an error appears here it is very difficult to trace :/
So now we have a traditional PHPUnit test method, and still we are testing everytime all modules (not stopping on the first error : we have only one assert at the end instead of an assert per module), and also we're getting the list of modules having errors at the end
Specifics:
- User / Grant matrix
- Subnet / IP Usage
- Incident / Known errors
- UserRequest (Simple/ITIL) / Known errors
Generics:
- History (moved to activity panel)
- Notifications
In the CoreException constructor, we're using the $aContextData parameter to do a count(), a foreach(), and uses values as string.
Only a null check was done.
Now we are also checking that the value is_array().
As others checks (Countable, Iterable, __toString() impl) are quite difficult depending on the PHP version we're running, we didn't add any other checks.
The call in \MatchExpression::__construct (added in 05a0d612) was passing directly an Expression object. We could embed it in an array, but the object hierarchy isn't implementing __toString so we would have another bug.
In consequence we removed this parameter.
- Allow usage of quotes, especially in attributes description
- Allow line breaks, especially in attributes description
- Allow better positioning (automatic) when close to the screen limits
- Allow HTML (careful about XSS), content is sanitized by default