You are here

public static function Helper::obfuscate_param in Anti Spam by CleanTalk 8.4

Same name and namespace in other branches
  1. 9.1.x src/lib/Cleantalk/Common/Helper.php \Cleantalk\Common\Helper::obfuscate_param()

* Masks a value with asterisks (*) Needed by the getFieldsAny() *

Return value

string

1 call to Helper::obfuscate_param()
Helper::get_fields_any in src/lib/Cleantalk/Common/Helper.php

File

src/lib/Cleantalk/Common/Helper.php, line 777

Class

Helper
CleanTalk Helper class. Compatible with any CMS.

Namespace

Cleantalk\Common

Code

public static function obfuscate_param($value = null) {
  if ($value && (!is_object($value) || !is_array($value))) {
    $length = strlen($value);
    $value = str_repeat('*', $length);
  }
  return $value;
}