$returnProperties = NULL;
}
- if (substr($sort, 0, 2) == 'id') {
+ if (substr(($sort ?? ''), 0, 2) == 'id') {
$sort = $lowercase_entity . "_" . $sort;
}
*/
function _civicrm_api3_validate_date(&$params, &$fieldName, &$fieldInfo) {
[$fieldValue, $op] = _civicrm_api3_field_value_check($params, $fieldName);
- if (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE) {
+ if (strpos(($op ?? ''), 'NULL') !== FALSE || strpos(($op ?? ''), 'EMPTY') !== FALSE) {
return;
}
// https://lab.civicrm.org/dev/rc/-/issues/14
$fieldValue = 1;
}
- if (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE) {
+ if (strpos(($op ?? ''), 'NULL') !== FALSE || strpos(($op ?? ''), 'EMPTY') !== FALSE) {
return;
}
function _civicrm_api3_validate_string(&$params, &$fieldName, &$fieldInfo, $entity, $action) {
$isGet = substr($action, 0, 3) === 'get';
[$fieldValue, $op] = _civicrm_api3_field_value_check($params, $fieldName, 'String');
- if (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE || CRM_Utils_System::isNull($fieldValue)) {
+ if (strpos(($op ?? ''), 'NULL') !== FALSE || strpos(($op ?? ''), 'EMPTY') !== FALSE || CRM_Utils_System::isNull($fieldValue)) {
return;
}