Merge pull request #15549 from Tithugues/fix/replace-gettype-by-is-functions
Use is_* functions instead of gettype
This commit is contained in:
commit
5b72d832cd
@ -3796,7 +3796,7 @@ class Results
|
||||
$is_analyse = $this->__get('is_analyse');
|
||||
$field_flags = $GLOBALS['dbi']->fieldFlags($dt_result, $col_index);
|
||||
|
||||
$bIsText = gettype($transformation_plugin) === 'object'
|
||||
$bIsText = is_object($transformation_plugin)
|
||||
&& strpos($transformation_plugin->getMIMEType(), 'Text')
|
||||
=== false;
|
||||
|
||||
@ -3828,7 +3828,7 @@ class Results
|
||||
// Cut all fields to $GLOBALS['cfg']['LimitChars']
|
||||
// (unless it's a link-type transformation or binary)
|
||||
$displayedColumn = $column;
|
||||
if (! (gettype($transformation_plugin) === "object"
|
||||
if (! (is_object($transformation_plugin)
|
||||
&& strpos($transformation_plugin->getName(), 'Link') !== false)
|
||||
&& false === stripos($field_flags, self::BINARY_FIELD)
|
||||
) {
|
||||
@ -5076,7 +5076,7 @@ class Results
|
||||
$result .= ']';
|
||||
|
||||
// if we want to use a text transformation on a BLOB column
|
||||
if (gettype($transformation_plugin) === "object") {
|
||||
if (is_object($transformation_plugin)) {
|
||||
$posMimeOctetstream = strpos(
|
||||
$transformation_plugin->getMIMESubtype(),
|
||||
'Octetstream'
|
||||
|
||||
@ -425,7 +425,7 @@ class Error extends Message
|
||||
if (in_array($function, $include_functions)) {
|
||||
$retval .= self::relPath($arg);
|
||||
} elseif (in_array($function, $connect_functions)
|
||||
&& gettype($arg) === 'string'
|
||||
&& is_string($arg)
|
||||
) {
|
||||
$retval .= gettype($arg) . ' ********';
|
||||
} elseif (is_scalar($arg)) {
|
||||
|
||||
@ -643,7 +643,7 @@ class Sql
|
||||
$property_value,
|
||||
$_POST['table_create_time']
|
||||
);
|
||||
if (gettype($retval) != 'boolean') {
|
||||
if (! is_bool($retval)) {
|
||||
$response = Response::getInstance();
|
||||
$response->setRequestStatus(false);
|
||||
$response->addJSON('message', $retval->getString());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user