-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04fad11
commit 019f13f
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -386,20 +386,24 @@ function expandEntities($val) | |
* @return mixed error string or false | ||
* @access public | ||
*/ | ||
|
||
function getError() | ||
{ | ||
if ($this->error_str != '') { | ||
if ($this->error_str !== '') { | ||
return $this->error_str; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
/** | ||
* sets error string | ||
* Function setError sets error string | ||
* | ||
* @return boolean $string error string | ||
* @access private | ||
* @param $str | ||
* | ||
* @author : 713uk13m <[email protected]> | ||
* @copyright: 713uk13m <[email protected]> | ||
* @time : 09/25/2021 11:55 | ||
*/ | ||
function setError($str) | ||
{ | ||
|
@@ -448,7 +452,7 @@ function serialize_val($val, $name = false, $type = false, $name_ns = false, $ty | |
$this->appendDebug('value=' . $this->varDump($val)); | ||
$this->appendDebug('attributes=' . $this->varDump($attributes)); | ||
|
||
if (is_object($val) && get_class($val) == 'soapval' && (!$soapval)) { | ||
if (is_object($val) && $val instanceof \soapval && (!$soapval)) { | ||
$this->debug("serialize_val: serialize soapval"); | ||
$xml = $val->serialize($use); | ||
$this->appendDebug($val->getDebug()); | ||
|
@@ -466,7 +470,7 @@ function serialize_val($val, $name = false, $type = false, $name_ns = false, $ty | |
// if name has ns, add ns prefix to name | ||
$xmlns = ''; | ||
if ($name_ns) { | ||
$prefix = 'nu' . rand(1000, 9999); | ||
$prefix = 'nu' . mt_rand(1000, 9999); | ||
$name = $prefix . ':' . $name; | ||
$xmlns .= " xmlns:$prefix=\"$name_ns\""; | ||
} | ||
|
@@ -476,7 +480,7 @@ function serialize_val($val, $name = false, $type = false, $name_ns = false, $ty | |
// w/o checking against typemap | ||
$type_prefix = 'xsd'; | ||
} elseif ($type_ns) { | ||
$type_prefix = 'ns' . rand(1000, 9999); | ||
$type_prefix = 'ns' . mt_rand(1000, 9999); | ||
$xmlns .= " xmlns:$type_prefix=\"$type_ns\""; | ||
} | ||
// serialize attributes if present | ||
|