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

[4.4] Fix Sample data installation, fix finder helper addContentType null value #43052

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Mar 16, 2024

Pull Request for Issue # .

Summary of Changes

Helper::addContentType() allows null for mime, however $db->quote() does not.
Same as #43051 but for 4.4

Testing Instructions

Use PHP 8+, set error reaporting to Maximum.
Set DB driver to use MySQL PDO
On clean installation, try install "Blog Sample Data"

Run following code (example in index.php of the template):

$name = uniqid(); // Imitating a new content type name, can be any string
var_dump(Joomla\Component\Finder\Administrator\Indexer\Helper::addContentType($name));

Actual result BEFORE applying this Pull Request

PHP warning Deprecated: PDO::quote(): Passing null to parameter 1 ($string) of type string is deprecated

Expected result AFTER applying this Pull Request

No warning

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

@Fedik Fedik added PHP 8.x PHP 8.x deprecated issues bug labels Mar 16, 2024
@toivo
Copy link
Contributor

toivo commented Mar 19, 2024

I have tested this item 🔴 unsuccessfully on 1738f32

Unable to reproduce the error in out-of-the-box Joomla 4.4.4-dev, run in Wampserver 3.3.3 usin PHP 8.2.13 on Windows 11.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43052.

@Fedik
Copy link
Member Author

Fedik commented Mar 19, 2024

I have updated test instruction,
old one was more for 5.x.

@HLeithner HLeithner changed the title Fix Sample data installation, fix finder helper addContentType null value [4.4] Fix Sample data installation, fix finder helper addContentType null value Apr 24, 2024
@fgsw
Copy link

fgsw commented Aug 6, 2024

Don't got the error in Joomla 4.4.7-dev, Mamp 7, PHP 8.3.8, Mac 14.5:
Ohne Titel

@Fedik
Copy link
Member Author

Fedik commented Aug 6, 2024

Error reaporting should be set to Maximum. To be able to see messages about deprections.

@fgsw
Copy link

fgsw commented Aug 6, 2024

Error reporting was set to Maximum.

@Fedik
Copy link
Member Author

Fedik commented Aug 6, 2024

Something is hidding the PHP message then. Can also try like:

error_reporting(E_ALL);
ini_set('display_errors', 'On');
$name = uniqid(); // Imitating a new content type name, can be any string
var_dump(Joomla\Component\Finder\Administrator\Indexer\Helper::addContentType($name));

@brianteeman
Copy link
Contributor

I cannot create the error either.

image

image

image

All that happens is that an int is displayed which increases on each page load
image

@Fedik
Copy link
Member Author

Fedik commented Aug 6, 2024

I have no idea then. I can clearly see it on my PHP 8.1

@Fedik
Copy link
Member Author

Fedik commented Aug 6, 2024

Ah, wait. I found, please use MySQL PDO, not MySQLi.
I have update the issue description.

@TLWebdesign
Copy link

I have tested this item ✅ successfully on 1738f32

Tested successfully on J4.4.7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43052.

@mabdelaziz77
Copy link
Contributor

I have tested this item ✅ successfully on 1738f32


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43052.

@Quy
Copy link
Contributor

Quy commented Aug 24, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43052.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 24, 2024
@laoneo laoneo merged commit 5772deb into joomla:4.4-dev Aug 30, 2024
3 of 4 checks passed
@laoneo
Copy link
Member

laoneo commented Aug 30, 2024

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 30, 2024
@laoneo laoneo added this to the Joomla! 4.4.9! milestone Aug 30, 2024
@Fedik Fedik deleted the finder-fix2 branch August 30, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PHP 8.x PHP 8.x deprecated issues PR-4.4-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants