[PECL-CVS] [pecl-math-stats] fix/stats_stat_correlation: address reviews
[email protected] (Rasmus Lerdorf) Tue, 21 Apr 2026 03:26:23 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Date: 2026-04-20T23:26:11-04:00
Commit: https://github.com/php/pecl-math-stats/commit/1e8e0d99f0e2f5b730b7410a75af32162a6bf6a7
Raw diff: https://github.com/php/pecl-math-stats/commit/1e8e0d99f0e2f5b730b7410a75af32162a6bf6a7.diff
address reviews
Changed paths:
M php_stats.c
Diff:
diff --git a/php_stats.c b/php_stats.c
index 0e63488..88f101b 100644
--- a/php_stats.c
+++ b/php_stats.c
@@ -3315,6 +3315,9 @@ PHP_FUNCTION(stats_stat_correlation)
while ((data1 = zend_hash_get_current_data_ex(Z_ARRVAL_P(arg1), &pos1)) != NULL
&& (data2 = zend_hash_get_current_data_ex(Z_ARRVAL_P(arg2), &pos2)) != NULL) {
+ convert_to_double_ex(data1);
+ convert_to_double_ex(data2);
+
dx = Z_DVAL_P(data1) - mx;
dy = Z_DVAL_P(data2) - my;