Skip to content

Commit

Permalink
false => null
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderGrom committed Nov 20, 2016
1 parent c8d1ba2 commit caf3a17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ cfgSetTagParamDefault — Указывает значения по умолча
**Параметры**
* $tag — (string) тег
* $param — (string) атрибут тега
* $value — (string | boolean) значение арибута
* $value — (string) значение арибута
* $isRewrite — (boolean) перезаписывать значение значением по умолчанию

**Пример использования**
```php
$qevix->cfgSetTagParamDefault('a', 'rel', 'nofollow', true);
$qevix->cfgSetTagParamDefault('a', 'download', false);
$qevix->cfgSetTagParamDefault('a', 'download', null);
$qevix->cfgSetTagParamDefault('img', 'alt', '');
```

Expand Down
6 changes: 3 additions & 3 deletions qevix.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function cfgSetTagGlobal($tags)
*
* @param string $tag тег
* @param string $param атрибут
* @param sring | boolean $value значение
* @param sring $value значение
* @param boolean $isRewrite перезаписывать значение значением по умолчанию
*/
public function cfgSetTagParamDefault($tag, $param, $value, $isRewrite = false)
Expand Down Expand Up @@ -1359,7 +1359,7 @@ protected function makeTag($tagName, $tagParams, $tagContent, $shortTag, $parent

else if($paramAllowedValues == '#bool')
{
$value = false;
$value = null;
}

else if($paramAllowedValues == '#link')
Expand Down Expand Up @@ -1454,7 +1454,7 @@ protected function makeTag($tagName, $tagParams, $tagContent, $shortTag, $parent

foreach($tagParamsResult as $param => $value)
{
if ($value === false) {
if (is_null($value)) {
if ($this->isXHTMLMode) {
$text .= ' '.$param.'="'.$param.'"';
} else {
Expand Down

0 comments on commit caf3a17

Please sign in to comment.