if ($str == CRM_Core_Permission::ALWAYS_ALLOW_PERMISSION) {
return TRUE;
}
-
// return the stubbed permission (defaulting to true if the array is missing)
- return is_array($this->permissions) ? in_array($str, $this->permissions) : TRUE;
+ return isset($this->permissions) && is_array($this->permissions) ? in_array($str, $this->permissions) : TRUE;
}
/**
* @param string $targetKey
* @param null $optionGroupName
*/
- public function __construct($refTable, $refKey, $targetTable = NULL, $targetKey = 'id', $optionGroupName) {
+ public function __construct($refTable, $refKey, $targetTable, $targetKey, $optionGroupName) {
parent::__construct($refTable, $refKey, $targetTable, $targetKey, NULL);
$this->targetOptionGroupName = $optionGroupName;
}
* @return int
* new pageId to display to the user
*/
- public function getPageID($defaultPageId = 1, &$params) {
+ public function getPageID($defaultPageId, &$params) {
// POST has higher priority than GET vars
// else if a value is set that has higher priority and finally the GET var
$currentPage = $defaultPageId;
*
* @return PropertyBag $this object so you can chain set setters.
*/
- protected function set($prop, $label = 'default', $value) {
+ protected function set($prop, $label, $value) {
$this->props[$label][$prop] = $value;
return $this;
}
*
* @dataProvider getRelationshipTypeDuplicates
*/
- public function testRemoveRelationshipTypeDuplicates($relationshipTypeList, $suffix = NULL, $expected, $description) {
+ public function testRemoveRelationshipTypeDuplicates($relationshipTypeList, $suffix, $expected, $description) {
$result = CRM_Contact_BAO_Relationship::removeRelationshipTypeDuplicates($relationshipTypeList, $suffix);
$this->assertEquals($expected, $result, "Failure on set '$description'");
}