Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Bug]: imagecreatefromstring(): Data is not in a recognized format

未關閉 適合新手
#20,412 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
74/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
冷清
技術堆疊
mariadb, php
領域
backend, databases

研究方向

從 libraries/classes/Image/ImageWrapper.php 第 95 行開始,使用 issue 中描述的 SQL 資料和影像轉換設定重現該警告。檢查表格瀏覽器如何處理同時包含無效影像資料和有效影像的列。完成標準是瀏覽表格時這些列不再發出 imagecreatefromstring 警告。

由索引模型根據 Issue 內容生成。

描述

Bug
Describe the bug

I think I managed to reproduce this bug https://reports.phpmyadmin.net/reports/view/89249

Warning in ./libraries/classes/Image/ImageWrapper.php#95
imagecreatefromstring(): Data is not in a recognized format

It happens when the structure of the image column is changed and rows contain a filename for example and also a image.

How to Reproduce
  1. Go to https://demo.phpmyadmin.net/QA_5_2/index.php?route=/&server=1 (MariaDB)
  2. Run
CREATE DATABASE IF NOT EXISTS `test`;

CREATE TABLE IF NOT EXISTS `test`.`test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` longblob NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT IGNORE INTO `test`.`test` (`id`, `image`) VALUES (1, 0x0);
INSERT IGNORE INTO `test`.`test` (`id`, `image`) VALUES (2, 0x89504e470d0a1a0a0000000d4948445200000001000000010802000000907753de0000000f494441547801010400fbff00ffffff05fe02fe49666e2b0000000049454e44ae426082);
  1. Go to Structure and change image with:

Media type -> image/png
Browser display transformation -> Inline (image/png): Inline

  1. Browser table
  2. See error
Screenshots

https://github.com/user-attachments/assets/4989c154-96f1-45f6-befa-4b78dd8c5aea

Database Server

MariaDB

phpMyAdmin version

5.2.4-dev, 6.0.0-dev

主要語言
PHP
星號
8k
分支
3.6k
平均合併
1 天 5 小時
30 天內合併 PR
29

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

phpmyadmin/phpmyadmin 的其他 Issue

查看 phpmyadmin/phpmyadmin 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。