`var_export()` expects #param 2 to be bool
This commit is contained in:
parent
deddcde0dd
commit
bb8076a09d
|
@ -194,7 +194,7 @@ class SelfServiceController extends ActionController
|
|||
} else {
|
||||
throw new ProgrammingError(
|
||||
'Expected boolean value, got %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ class RestApiResponse
|
|||
throw new IcingaException('API request failed: ' . $result->status);
|
||||
}
|
||||
} else {
|
||||
throw new IcingaException('API request failed: ' . var_export($result, 1));
|
||||
throw new IcingaException('API request failed: ' . var_export($result, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ abstract class CustomVariable implements IcingaConfigRenderer
|
|||
// TODO: check for specific class/stdClass/interface?
|
||||
return new CustomVariableDictionary($key, $value);
|
||||
} else {
|
||||
throw new LogicException(sprintf('WTF (%s): %s', $key, var_export($value, 1)));
|
||||
throw new LogicException(sprintf('WTF (%s): %s', $key, var_export($value, true)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class CustomVariableBoolean extends CustomVariable
|
|||
if (! is_bool($value)) {
|
||||
throw new ProgrammingError(
|
||||
'Expected a boolean, got %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class CustomVariableNull extends CustomVariable
|
|||
if (! is_null($value)) {
|
||||
throw new ProgrammingError(
|
||||
'Null can only be null, got %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class CustomVariableNumber extends CustomVariable
|
|||
if (! is_int($value) && ! is_float($value)) {
|
||||
throw new ProgrammingError(
|
||||
'Expected a number, got %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class DbDataFormatter
|
|||
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Got invalid boolean: %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -984,7 +984,7 @@ abstract class DbObject
|
|||
$this->table,
|
||||
$this->getLogId(),
|
||||
$e->getMessage(),
|
||||
var_export($this->getProperties(), 1) // TODO: Remove properties
|
||||
var_export($this->getProperties(), true) // TODO: Remove properties
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class PropertyMangler
|
|||
throw new InvalidArgumentException(sprintf(
|
||||
'I can only append to arrays, %s is %s',
|
||||
$key,
|
||||
var_export($current, 1)
|
||||
var_export($current, true)
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class PropertyMangler
|
|||
throw new InvalidArgumentException(sprintf(
|
||||
'I can only remove strings or from arrays, %s is %s',
|
||||
$key,
|
||||
var_export($current, 1)
|
||||
var_export($current, true)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class Branch
|
|||
$row->uuid = stream_get_contents($row->uuid);
|
||||
}
|
||||
if (strlen($row->uuid) !== 16) {
|
||||
throw new RuntimeException('Valid UUID expected, got ' . var_export($row->uuid, 1));
|
||||
throw new RuntimeException('Valid UUID expected, got ' . var_export($row->uuid, true));
|
||||
}
|
||||
$self->branchUuid = Uuid::fromBytes(Db\DbUtil::binaryResult($row->uuid));
|
||||
$self->name = $row->branch_name;
|
||||
|
|
|
@ -31,7 +31,7 @@ class IcingaObjectFilterHelper
|
|||
throw new InvalidArgumentException(sprintf(
|
||||
'Numeric ID or IcingaObject expected, got %s',
|
||||
// TODO: just type/class info?
|
||||
var_export($id, 1)
|
||||
var_export($id, true)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -410,7 +410,7 @@ class BasketSnapshot extends DbObject
|
|||
try {
|
||||
JsonString::encode($object);
|
||||
} catch (JsonEncodeException $singleError) {
|
||||
$dump = var_export($object, 1);
|
||||
$dump = var_export($object, true);
|
||||
if (function_exists('iconv')) {
|
||||
$dump = iconv('UTF-8', 'UTF-8//IGNORE', $dump);
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ class IcingaConfigHelper
|
|||
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Unexpected type %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class SyncUtils
|
|||
throw new InvalidArgumentException(sprintf(
|
||||
'Data is not nested, cannot access %s: %s',
|
||||
$var,
|
||||
var_export($row, 1)
|
||||
var_export($row, true)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class DirectorDatalistEntry extends DbObject
|
|||
} else {
|
||||
throw new RuntimeException(
|
||||
'Expected array or null for allowed_roles, got %s',
|
||||
var_export($roles, 1)
|
||||
var_export($roles, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ class IcingaObjectGroups implements Iterator, Countable, IcingaConfigRenderer
|
|||
} else {
|
||||
throw new RuntimeException(
|
||||
'Invalid group object: %s',
|
||||
var_export($group, 1)
|
||||
var_export($group, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
|||
} else {
|
||||
throw new ProgrammingError(
|
||||
'Invalid related object: %s',
|
||||
var_export($relation, 1)
|
||||
var_export($relation, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ class IcingaRelatedObject
|
|||
} else {
|
||||
throw new ProgrammingError(
|
||||
'Related object can be name or object, got: %s',
|
||||
var_export($related, 1)
|
||||
var_export($related, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ class IcingaTemplateChoice extends IcingaObject implements ExportInterface
|
|||
} else {
|
||||
throw new ProgrammingError(
|
||||
'Expected array or null for allowed_roles, got %s',
|
||||
var_export($roles, 1)
|
||||
var_export($roles, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ class PlainObjectRenderer
|
|||
} elseif (is_string($object)) {
|
||||
return self::renderString($object);
|
||||
} else {
|
||||
return '(UNKNOWN TYPE) ' . var_export($object, 1);
|
||||
return '(UNKNOWN TYPE) ' . var_export($object, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class PropertyModifierArrayFilter extends PropertyModifierHook
|
|||
default:
|
||||
throw new ConfigurationError(
|
||||
'%s is not a valid value for an ArrayFilter filter_method',
|
||||
var_export($method, 1)
|
||||
var_export($method, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class PropertyModifierExtractFromDN extends PropertyModifierHook
|
|||
default:
|
||||
throw new InvalidPropertyException(
|
||||
'DN part extraction failed for %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ class PropertyModifierRejectOrSelect extends PropertyModifierHook
|
|||
default:
|
||||
throw new ConfigurationError(
|
||||
'%s is not a valid value for an ArrayFilter filter_method',
|
||||
var_export($method, 1)
|
||||
var_export($method, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ class RestApiClient
|
|||
|
||||
if ($statusCode >= 400) {
|
||||
throw new RuntimeException(
|
||||
"Got $statusCode: " . \var_export($res, 1)
|
||||
"Got $statusCode: " . \var_export($res, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class ExtensibleSet extends FormElement
|
|||
if (! is_array($value)) {
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'ExtensibleSet expects to work with Arrays, got %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
));
|
||||
}
|
||||
$value = array_filter($value, 'strlen');
|
||||
|
|
|
@ -111,7 +111,7 @@ class ExtensibleSetElement extends BaseHtmlElement
|
|||
if (null !== $value && ! is_array($value)) {
|
||||
throw new ProgrammingError(
|
||||
'Got unexpected value, no array: %s',
|
||||
var_export($value, 1)
|
||||
var_export($value, true)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ class ExtensibleSetElement extends BaseHtmlElement
|
|||
} else {
|
||||
return \sprintf(
|
||||
$this->translate('%s (not an Array!)'),
|
||||
\var_export($this->inherited, 1)
|
||||
\var_export($this->inherited, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ class BasketSnapshotTable extends ZfQueryBasedTable
|
|||
if (! is_object($summary) && ! is_array($summary)) {
|
||||
throw new RuntimeException(sprintf(
|
||||
'Got invalid basket summary: %s ',
|
||||
var_export($summary, 1)
|
||||
var_export($summary, true)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue