Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix str_replace null in Zend_Form_Element::_getErrorMessages() #460

Merged

Conversation

t-gebauer
Copy link

@t-gebauer t-gebauer commented Nov 28, 2024

Deprecated: str_replace(): Passing null to parameter # 2 ($replace) of type array|string is deprecated in //zf1-future/library/Zend/Form/Element.php on line 2349

set_include_path('library');

require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();

$e = new Zend_Form_Element_Text('test');
$e->setIsArray(true)
    ->addValidator('Int')
    ->addFilter(new Zend_Filter_Null(Zend_Filter_Null::STRING))
    ->addErrorMessage('Invalid %value%');

$e->isValid(['']);

Other places in the function have already been adjusted: 673290a#diff-4de0f6e712ea2a7c9a1bcd60f804afb239d82095cfa68e28e18e2946d2b4abc4

@develart-projects develart-projects merged commit 074fb82 into Shardj:master Nov 28, 2024
11 checks passed
@develart-projects develart-projects added bug Something isn't working to be released PR exists or in master, but not released yet labels Nov 28, 2024
@develart-projects develart-projects added this to the 1.24.3 milestone Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to be released PR exists or in master, but not released yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants