Compare commits
2 Commits
2a5eac7450
...
f905d02577
Author | SHA1 | Date |
---|---|---|
Sergio Álvarez | f905d02577 | |
Sergio Álvarez | 0ddde4bc27 |
19
README.md
19
README.md
|
@ -1,3 +1,18 @@
|
||||||
[![Build Status](https://drone.xrg.io/api/badges/code/xrg.es/status.svg)](https://drone.xrg.io/code/xrg.es)
|
[![Build Status](https://ci.sergio.am/api/badges/code/xrg.es/status.svg)](https://ci.sergio.am/code/xrg.es)
|
||||||
|
|
||||||
For more info: `cd docker`
|
For more info: `cd docker`
|
||||||
|
|
||||||
|
# [PHP Regular Expressions tester](http://xrg.es)
|
||||||
|
|
||||||
|
Source code, ofc.
|
||||||
|
|
||||||
|
## Thanks to
|
||||||
|
|
||||||
|
- Sergio López [@slopezbustos](http://twitter.com/slopezbustos)
|
||||||
|
- Jordi Rivero [@jrivero](http://twitter.com/jrivero)
|
||||||
|
- Jorge Massanet [@Percewall](http://twitter.com/Percewall)
|
||||||
|
- DigitalVirgo I+D team&co-workers <https://www.digitalvirgo.com>
|
||||||
|
|
||||||
|
## Copyright and license
|
||||||
|
|
||||||
|
Copyright 2014+ Sergio Álvarez [the MIT license](LICENSE).
|
||||||
|
|
|
@ -18,7 +18,10 @@ class PregResponse
|
||||||
public readonly ?string $returnValue,
|
public readonly ?string $returnValue,
|
||||||
) {
|
) {
|
||||||
if (preg_last_error() !== PREG_NO_ERROR) {
|
if (preg_last_error() !== PREG_NO_ERROR) {
|
||||||
throw new Exception('preg_last_error() = '. preg_last_error_msg());
|
$error = error_get_last();
|
||||||
|
$detail = preg_last_error() === PREG_INTERNAL_ERROR && !is_null($error) ? (': ' . $error['message']) : '';
|
||||||
|
|
||||||
|
throw new Exception('preg_last_error() = ' . preg_last_error_msg() . $detail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue