Commit graph

619 commits

Author SHA1 Message Date
mark_story
d7d8b90986 Merge branch '2.6' into 2.7 2015-05-28 19:34:59 -04:00
mark_story
65691836be Fix syntax errors in PHP <5.4 2015-05-28 17:39:52 -04:00
mark_story
995d8d22c6 Disable reading XML files and URLs when handling user data.
Allowing users to load arbitrary files/URLs with Xml is not desirable
when handing user input.
2015-05-27 09:45:53 -04:00
nojimage
c6e4208bda refs #6635 Inflector::underscore, humanize support multibyte string inputs 2015-05-26 13:29:05 +09:00
Marc Würth
508b9d1443 Rename test methods after notBlank change
Was a left-over from #6579
2015-05-19 15:13:28 +02:00
Mark Scherer
866242643f Deprecate notEmpty in favor of notBlank. 2015-05-17 22:13:04 +02:00
ndm2
323e8d8d76 Add underscore support for multi word irregulars.
Underscore separated words were not catched by the irregular regex,
tests however didn't fail as the default rules matched the tested words
too. The added test should ensure that this won't happen again.

Fixes the gap left by the previous #6538 fix.
2015-05-12 14:33:15 +02:00
mark_story
d4740c9c09 Fix incorrect handling of irregular values.
When inflecting irregular values, both plural and singular forms were
generated incorrectly.

Fixes #6538
2015-05-11 21:35:08 -04:00
mark_story
032c01d18c Add other key types to {*} test. 2015-05-01 22:41:41 -04:00
mark_story
5e9d4893a8 Add the {*} matcher to Hash::extract()
This matcher will match anything and is useful when you just want to
traverse through data and you're not too picky.

I've also refactored the conditions to use a case as it is slightly more
readable and uses fewer lines of code.

Refs #6447
2015-05-01 22:03:40 -04:00
mark_story
096a2ebb72 Merge branch '2.6' into 2.7
Conflicts:
	lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
	lib/Cake/VERSION.txt
2015-04-20 15:42:54 -04:00
mark_story
a6aefdd4d3 Fix null path in Hash::get() causing exceptions.
This was a regression introduced in 2.6.x

Refs #6297
2015-04-09 07:50:29 -04:00
Mark van Driel
4a7344ae80 Keep only test for null value as path 2015-04-09 07:49:35 -04:00
Mark van Driel
900fd3e7e5 Test to demonstrate issue with non-string paths in Hash::get 2015-04-09 07:47:25 -04:00
José Lorenzo Rodríguez
405e725767 Merge pull request #6238 from cakephp/issue-6224
Fix maxDimensions() for empty/1 dimensional arrays.
2015-04-01 09:26:50 +02:00
Justin Yost
f32d1c1362 Updates Inflector For Irregular Case Sieves
Sieves incorrectly singualrized as sief.
Adds sieve, sieves as an irregular case and test cases to
match for the Inflector class.
Closes Issue #6240 in CakePHP 2.6 Branch

Signed-off-by: Justin Yost <justin.yost@yostivanich.com>
2015-03-31 22:21:05 -07:00
mark_story
69971505a2 Fix maxDimensions() for empty/1 dimensional arrays.
maxDimensions() should not emit warnings or mis-calculate an array's
dimensions.

Fixes #6224
2015-03-31 22:21:15 -04:00
mark_story
0b916cedbb Merge branch 'master' into 2.7 2015-03-09 21:55:20 -04:00
Mark van Driel
ed5da19d10 Fixed return type of toQuarter in CakeTime and TimeHelper 2015-03-02 12:08:11 +01:00
mark_story
3078a1eb52 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-01-16 22:22:26 -05:00
mark_story
d39c744c28 Fix PHPCS error. 2015-01-12 21:37:34 -05:00
mark_story
7b20884d43 Fix failing tests. 2015-01-12 21:36:28 -05:00
mark_story
ac9a212d44 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/Utility/String.php
2015-01-11 15:25:18 -05:00
mark_story
cd58fa0b61 Backport changes from #5635 to 2.x
In case the path passed to the File class doesn't exists, this will
cause File::$path to be set to a partial path, that is the filename
of the passed path with a slash prepended, ex with

    $file = new File('/non/existent/file');

calling $file->pwd() will return/set /file, possibly causing that
file in the root to be accessed.
2015-01-11 15:20:34 -05:00
euromark
389f745d16 Stop goofy formatting when newlines are present already. 2015-01-06 13:13:33 +01:00
euromark
63093e1d30 More String CakeText replacements and a BC class. 2015-01-05 00:55:23 +01:00
euromark
274b78e44c Rename test case. 2015-01-05 00:54:36 +01:00
mark_story
4d6611b328 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
mark_story
ac6d5cc70f Fix incorrect pluralization of Human.
Human should become humans, unlike other words ending in man.

Fixes #5370
2014-12-09 21:51:42 -05:00
euromark
e1c128bb99 Consolidate with conditions sniff. 2014-12-09 03:17:35 +01:00
mark_story
ad2d6edda9 Merge branch 'master' into 2.6 2014-12-06 21:28:59 -05:00
Guy Warner
fb61d9393b Add @trigger doc blocks of methods triggering CakeEvent 2014-11-30 14:45:40 -07:00
mark_story
579b16d90b Merge branch 'master' into 2.6 2014-10-30 21:20:53 -04:00
mark_story
d228d83b1e Relative paths should be created relative to pwd.
If create() is called with a relative directory and the path does not
exist, it should be created inside of the folder->pwd() and not inside
the process' cwd.

Refs #4990
2014-10-27 21:32:28 -04:00
Schlaefer
fd2dd58360 code formatting, fixes PHPCS errors 2014-10-01 11:25:24 +02:00
Schlaefer
b96eb1fb46 cleans up CakeTime::timeAgoInWords and adds option for custom futures string 2014-10-01 10:35:41 +02:00
mark_story
af43bc1706 Merge branch 'master' into 2.6 2014-09-25 22:39:51 -04:00
Yves
b70cb132fd Fix Hash::remove() removing data even if the path is not matched 2014-09-23 22:00:49 +02:00
mark_story
249dc5650b Merge branch 'relative-sprintf' into 2.6
Refs #4550
2014-09-22 20:56:33 -04:00
mstra001
d6abfcaf90 Update tests for strfime() in timeAgoInWords()
Add test asserts for testTimeAgoInWordsWithFormat with strftime format
2014-09-22 20:50:37 -04:00
ADmad
3fb252ad2f Merge branch 'master' into 2.6 2014-09-13 00:37:16 +05:30
Yves
90ad813b40 Fix Hash not returning correct value with special paths
When doing a Hash::insert() with a part of the path starting with a '0', Hash::get() returned null even if the same path was used.
2014-09-10 22:47:25 +02:00
euromark
e77f96d8b7 Use (int) cast instead of intval() function for performance reasons and to unify it. 2014-09-10 15:52:57 +02:00
mark_story
86bc7f1861 Add tests for #4521 and reformat code.
Add a regression test for #4521 as the original author didn't have one.
Reformat a long line since I was nearby already.

Closes #4521
2014-09-09 21:33:17 -04:00
mark_story
7c316bbc56 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/basics.php
2014-08-30 21:28:11 -04:00
mark_story
c26b381469 Make words ending in data uninflected.
Since both metadata and word ending in metadata have caused issues in
the past, uninflecting them seems like the best option. This will also
cover cases like ProfileData not being inflected to ProfileDatum which
seems like an improvement to me.

Fixes #4419
2014-08-30 20:27:37 -04:00
mark_story
4a805af5c6 Merge branch 'master' into 2.6 2014-08-23 09:20:19 +02:00
mark_story
0400a63004 Forward port fixes for #4294 from 1.3 to 2.x
CakeTime was broken in the same way as TimeHelper was in 1.x. Getting
1969 on invalid input can be very confusing and un-helpful.

Refs #4294
2014-08-20 00:25:01 +02:00
mark_story
9c3089796f Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
euromark
9ef7b5713a CS fixes. 2014-08-04 13:53:52 +02:00