Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Add note in about deprecation of CRM_Core_Error::fatal #813

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion docs/security/inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
```

Expand Down