Skip to content

Commit

Permalink
Merge pull request #14 from mehdibo/develop
Browse files Browse the repository at this point in the history
Release v1.1.1
  • Loading branch information
mehdibo authored Jun 15, 2022
2 parents bf69b85 + 6cf441a commit 40102aa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This library makes it easy to use [Google's reCAPTCHA V2](https://developers.goo
### Via composer
If you have composer installed you can run

```batch
```sh
composer require mehdibo/codeigniter-recaptcha
```

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "Mehdi Bounya",
"email": "contact.mehdi@pm.me",
"role": "Developer",
"homepage": "https://twitter.com/mehdibounya"
"homepage": "https://twitter.com/bounyamehdi"
}
],
"require": {
Expand All @@ -22,4 +22,4 @@
"autoload": {
"classmap": ["libraries/Recaptcha.php"]
}
}
}
18 changes: 11 additions & 7 deletions libraries/Recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,17 @@ public function create_box($attr = NULL)
// Add the site key
$box .= ' data-sitekey="'. html_escape($this->_site_key) .'"';

// Add parameters
foreach ($this->_parameters as $parameter => $value){
// Check if the value is not NULL
if($value !== NULL)
{
// Add it to the box
$box .= ' data-'. html_escape($parameter) .'="'. html_escape($value) .'"';
// Check if parameters is available
if (!empty($this->_parameters) )
{
// Add parameters
foreach ($this->_parameters as $parameter => $value){
// Check if the value is not NULL
if($value !== NULL)
{
// Add it to the box
$box .= ' data-'. html_escape($parameter) .'="'. html_escape($value) .'"';
}
}
}

Expand Down

0 comments on commit 40102aa

Please sign in to comment.