Skip to content
Snippets Groups Projects
Commit 7086c600 authored by Seamus Lee's avatar Seamus Lee
Browse files

Add note in about depraction of CRM_Core_Error::fatal

parent d4c88668
No related branches found
No related tags found
No related merge requests found
......@@ -74,3 +74,11 @@ Fully supported methods are:
* Internal Symfony listeners (e.g. `civi.api.resolve`, `civi.api.prepare`)
See also this [blog post](https://civicrm.org/blog/totten/the-static-is-dead-long-live-the-static) describing the `Civi::` facade in more detail.
### Deprecated Methods
Some methods within the CiviCRM Code base that extension developers have been relying on have now been deprecated:
* `CRM_Core_Error::fatal`
Extension authors should replace fucntion calls with either `throw new CRM_Core_Exception` or `throw new <insert CiviCRM Generated Exception>` or `CRM_Core_Error::statusBounce` if the error is being generaged from a form.
......@@ -25,7 +25,7 @@ If you find yourself wanting to use the `'String'` type, beware that this type o
```php
$angPage = CRM_Utils_Request::retrieve('angPage', 'String', $this);
if (!preg_match(':^[a-zA-Z0-9\-_/]+$:', $angPage)) {
CRM_Core_Error::fatal('Malformed return URL');
throw new CRM_Core_Exception('Malformed return URL');
}
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment