e107_admin/lancheck.php
Consider simplifying this complex logical expression. Open
Open
if((strpos($eng_line,"[link=")!==FALSE && strpos($trans_line,"[link=")===FALSE) || (strpos($eng_line,"[b]")!==FALSE && strpos($trans_line,"[b]")===FALSE))
{
$error[] = $def. ": ".LAN_CHECK_30;
}
elseif((strpos($eng_line,"[")!==FALSE && strpos($trans_line,"[")===FALSE) || (strpos($eng_line,"]")!==FALSE && strpos($trans_line, "]")===FALSE))
Avoid too many return
statements within this method. Open
Open
return $ret;
Avoid too many return
statements within this method. Open
Open
return $ret;
Suspicious array access to float|int
Open
Open
$ret['bom'][$key] = $fname;
- Exclude checks
Argument 1 (input)
is null
but \array_keys()
takes array
Open
Open
$subkeys = array_keys($trans['orig']);
- Exclude checks
Argument 1 (path)
is object
but \basename()
takes string
Open
Open
$subject .= basename($newfile);
- Exclude checks
Argument 11 (returnreceipt)
is ''
but \sendemail()
takes bool|false
defined at /code/e107_handlers/mail.php:1498
Open
Open
if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline))
- Exclude checks
Call to method add
from undeclared class \PclZip
Open
Open
$addTag = $archive->add($fileName, PCLZIP_OPT_ADD_PATH, 'e107_languages/'.$language, PCLZIP_OPT_REMOVE_PATH, e_FILE.'public/');
- Exclude checks
Saw an @param annotation for filter,
but it was not found in the param list of function getFilePaths($path, $language, array|mixed $restrict = null) : array|bool
Open
Open
* @param string $filter
- Exclude checks
Suspicious array access to nullable ?array{fname:'English.php'}|?mixed
Open
Open
if($f['path'].$f['fname'] == e_LANGUAGEDIR.$lang."/".$lang."_custom.php")
- Exclude checks
Variable $input
is undeclared Open
Open
unset($input);
- Exclude checks
Invalid offset "tran"
of array type array{bom:array<string>}|array{}|float|int</string>
Open
Open
if(empty($trans['tran'][$sk]) && !empty($trans['orig'][$sk]))
- Exclude checks
Reference to undeclared constant \LANG_LAN_EML
Open
Open
$text .= defined('LANG_LAN_EML') ? "<b>".LANG_LAN_EML."</b>" : "<b>There was a problem sending the language-pack. Please email your verified language pack to:</b>";
- Exclude checks
Invalid offset "orig"
of array type array{bom:array<string>}|array{}|float|int</string>
Open
Open
$subkeys = array_keys($trans['orig']);
- Exclude checks
Invalid offset "orig"
of array type array{bom:array<string>}|array{tran:mixed,bom:array<string>}|array{}|float|int</string></string>
Open
Open
elseif($trans['tran'][$sk] == $trans['orig'][$sk])
- Exclude checks
Invalid offset "orig"
of array type array{bom:array<string>}|array{}|float|int</string>
Open
Open
$rowamount = round(strlen($trans['orig'][$sk])/34)+1;
- Exclude checks
Call to method errorInfo
from undeclared class \PclZip
Open
Open
$ret['message'] = $archive->errorInfo(true);
- Exclude checks
Reference to undeclared constant \PCLZIP_OPT_ADD_PATH
Open
Open
$addTag = $archive->add($fileName, PCLZIP_OPT_ADD_PATH, 'e107_languages/'.$language, PCLZIP_OPT_REMOVE_PATH, e_FILE.'public/');
- Exclude checks
Reference to undeclared constant \PCLZIP_OPT_REMOVE_PATH
Open
Open
if ($archive->create($data,PCLZIP_OPT_REMOVE_PATH,e_BASE) == 0)
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type '\x40attributes',
but expected the index to be of type int
Open
Open
$value = $rawData['@attributes'];
- Exclude checks
Expected @param annotation for path
to be before the @param annotation for defKeys
Open
Open
* @param array $defKeys array of constants to comment out.
- Exclude checks
Call to method create
from undeclared class \PclZip
Open
Open
if ($archive->create($data,PCLZIP_OPT_REMOVE_PATH,e_BASE) == 0)
- Exclude checks
Variable $folder
was undeclared, but array fields are being added to it. Open
Open
$folder['P'] = e_PLUGIN.$comp_name;
- Exclude checks
Invalid offset "orig"
of array type array{bom:array<string>}|array{}|float|int</string>
Open
Open
if(empty($trans['tran'][$sk]) && !empty($trans['orig'][$sk]))
- Exclude checks
Argument #1 of this call to \str_replace
is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order. Open
Open
$text = str_replace($srch, $rpl, LANG_LAN_154);
- Exclude checks
Suspicious array access to float|int
Open
Open
$ret['bom'][$key] = $fname;
- Exclude checks
string
passed to foreach instead of array Open
Open
foreach($rawData['language'] as $key => $att)
- Exclude checks
Saw unextractable annotation for comment '* @return'
Open
Open
* @return
- Exclude checks
Reference to undeclared constant \PCLZIP_OPT_REMOVE_PATH
Open
Open
$addTag = $archive->add($fileName, PCLZIP_OPT_ADD_PATH, 'e107_languages/'.$language, PCLZIP_OPT_REMOVE_PATH, e_FILE.'public/');
- Exclude checks
Call to method __construct
from undeclared class \PclZip
Open
Open
$archive = new PclZip($newfile);
- Exclude checks
Argument 7 (attachments)
is object
but \sendemail()
takes string
defined at /code/e107_handlers/mail.php:1498
Open
Open
if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline))
- Exclude checks
When fetching an array index from a value of type string,
found an array index of type 'language',
but expected the index to be of type int
Open
Open
foreach($rawData['language'] as $key => $att)
- Exclude checks