Comments (4)
Admittedly, the documentation on the site is in need of an update, and the current state of things is to use the examples and code as docs (bad!). But this does seem like a fair warning.
The phpDoc comments for the check()
function reads:
/**
* Checks a given code against the correct value from the session and/or database.
*
* @param string $code The captcha code to check
* @param string $captchaId The ID of the captcha being checked
* @param bool $alwaysDelete True to delete captcha data after a failed guess.
* Useful if the form post results in a full page reload and the old captcha
* ID is never used again. Not so useful on Ajax forms. (default false)
*
* <code>
* $code = $_POST['code'];
* $img = new Securimage();
* if ($img->check($code) == true) {
* $captcha_valid = true;
* } else {
* $captcha_valid = false;
* }
* </code>
*
* @return bool true if the given code was correct, false if not.
*/
Admittedly, the 'string' parameter hint is subtle as well.
I'm not against type checking the $code parameter explicitly to prevent this warning from strtolower. Would a trigger_error
to the effect of The $code parameter passed to Securimage::check() must be a string, $type given
be sufficient in your opinion?
from securimage.
My error log is full of this error:
The $code parameter passed to Securimage::check() must be a string, NULL given in /home/xxxx/public_html/securimage/securimage.php on line 1278
from securimage.
My error log is full of this error:
The $code parameter passed to Securimage::check() must be a string, NULL given in /home/xxxx/public_html/securimage/securimage.php on line 1278
Yes I get this too.
from securimage.
I solved this problem. The problem is solved when I send the values sent from the form with GET instead of POST and receive them with GET.
from securimage.
Related Issues (20)
- Typo in PDO::purgeOldCodesFromDatabase() in master HOT 2
- Difference in captcha image reload functionally in the two branches HOT 1
- When using case sensitive captcha, the audio version just says the letter and not capital or lowercase letter
- Composer install post cmd error HOT 7
- [Bug reporting] multiple XSS in securimage
- secureimage.php – curley braces are deprecated HOT 1
- Redis setTimeout is deprecated consider changing to expire HOT 1
- php8 float conversion HOT 1
- Compatibility with PHP 8.2 HOT 1
- www.phpcaptcha.org domain for sale HOT 2
- dynamic property Securimage.... is deprecated in php 8.2 HOT 1
- New release? HOT 1
- Deprecated with php v8.2 HOT 1
- can't install via composer HOT 2
- captcha Audio with Captcha IDs
- Erreur: Undefined class constant 'SI_DRIVER_SQLITE3' in StorageAdapter/PDO.php file HOT 1
- Illegal string offset 'code' in securimage.php:1403 HOT 3
- Curly brace syntax
- Composer version HOT 3
- Project status HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from securimage.