Skip to content

feat: Add Traditional Chinese language file & fix: Resolve all PHP warnings and modernize for DokuWiki 2025-05-14a compatibility #80

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tryweb
Copy link

@tryweb tryweb commented Apr 13, 2025

This commit introduces a new language file for Traditional Chinese. This file will provide translations for the user interface and any relevant text within the application.

tryweb added 3 commits April 14, 2025 07:37
…compatibility

- Fix undefined array key warnings in $_SERVER and $_REQUEST access across all files
- Fix undefined property warnings in browser detection objects
- Replace deprecated functions with modern DokuWiki 2025 APIs:
  - dbglog() → \dokuwiki\Logger::debug()
  - DokuHTTPClient → \dokuwiki\HTTP\DokuHTTPClient
  - utf8_* functions → \dokuwiki\Utf8\* namespace equivalents
- Implement defensive programming with isset() checks for all array access
- Fix database query result validation in StatisticsQuery class
- Resolve "A non-numeric value encountered" errors in chart generation:
  - Add three-layer data validation system for pChart library
  - Implement comprehensive numeric type casting and validation
  - Fix pie chart "other" key initialization issues
  - Add DataSet reconstruction for XY plot graphs
- Remove deprecated require_once() calls in favor of autoloading
- Update error logging to use modern structured logging
- Ensure backward compatibility while modernizing codebase
- Add enterprise-grade error handling and data sanitization

All PHP E_WARNING errors eliminated, plugin now fully compatible with
DokuWiki 2025-05-14a "Librarian" with zero warnings or deprecated function calls.
@tryweb tryweb changed the title feat: Add Traditional Chinese language file feat: Add Traditional Chinese language file & fix: Resolve all PHP warnings and modernize for DokuWiki 2025-05-14a compatibility Jun 25, 2025
- Add validation in PieChart::drawBasicPieGraph() to check for $PieSum == 0
- When all pie chart data sums to zero, set appropriate SpliceRatio and SplicePercent values
- Enhance data validation in StatisticsGraph::PieChart() to handle zero-sum datasets
- Replace zero-sum data with single "No Data" entry to prevent chart rendering issues
- Resolves DivisionByZeroError at PieChart.php:181 when statistics contain no data

Fixes: Statistics plugin crashes when generating charts with empty/zero data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant