Skip to content

Commit

Permalink
#680 Fix deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
amazeika committed Jun 17, 2024
1 parent 83a0af1 commit 84d283c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Ercan Ozkaya <https://github.com/ercanozkaya>
* @package Koowa\Component\Files
*/
#[\AllowDynamicProperties]
abstract class ComFilesAdapterAbstract extends KObject
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @link http://www.joomlatools.com
*/


#[\AllowDynamicProperties]
class ComMigratorControllerExport extends ComMigratorControllerMigrator
{
protected function _initialize(KObjectConfig $config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* Import Controller Class.
*/
#[\AllowDynamicProperties]
class ComMigratorControllerImport extends ComMigratorControllerMigrator
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,23 @@ protected function _quoteValue($value)

$config = $this->getConfig();

if(strpos($value, $config->separator) !== false) { // Separator is present in field
return true;
}

if(strpos($value, $config->quote) !== false) { // Quote character is present in field
return true;
}

if (strpos($value, "\n") !== false || strpos($value, "\r") !== false ) { // Newline is present in field
return true;
}

if(substr($value, 0, 1) == " " || substr($value, -1) == " ") { // Space found at beginning or end of field value
return true;
if ($value)
{
if(strpos($value, $config->separator) !== false) { // Separator is present in field
return true;
}

if(strpos($value, $config->quote) !== false) { // Quote character is present in field
return true;
}

if (strpos($value, "\n") !== false || strpos($value, "\r") !== false ) { // Newline is present in field
return true;
}

if(substr($value, 0, 1) == " " || substr($value, -1) == " ") { // Space found at beginning or end of field value
return true;
}
}

return false;
Expand Down

0 comments on commit 84d283c

Please sign in to comment.