Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


2.0 #178

wants to merge 1,931 commits into from

No description provided.

lorenzo and others added some commits
@lorenzo lorenzo Merge remote branch 'origin/2.0-pdo' into 2.0 847e775
@lorenzo lorenzo Merge remote branch 'origin/2.0' into 2.0
@jeremyharris jeremyharris Removed unnecessary pass by references 5eab027
@jrbasso jrbasso Request return a pointer to body. It will reduce the memory usage in …
…big responses.
@jeremyharris jeremyharris Merge branch '2.0' of into 2.0 8a7e260
@markstory markstory Removing collisions that prevent TestTask from being loaded. 0ec1e65
@markstory markstory Merge branch '2.0-config' into 2.0
@markstory markstory Fixing failing tests caused by constants changing. c096eea
@jrbasso jrbasso Default value to raw key, avoiding warnings if line is false. 151ea28
@jrbasso jrbasso Minor optimization in HttpSocket::reset(). 33bb253
@jrbasso jrbasso HttpSocket::_configUri() always change config attribute and it is pub…
…lic. This function dont need return it.
@jrbasso jrbasso Renamed proxy method and calling togheter from host config. d656bda
@jrbasso jrbasso Minor optimizations. 7c23d28
@jrbasso jrbasso Updating docs. bcacace
@predominant predominant Refs #621. Provides default maxLimit for pagination to prevent url ma…
…nipulation causing long queries.
@predominant predominant Made debug() output html-safe strings by default. e9907cb
@markstory markstory Expanding and correcting the doc block for ObjectCollection. 1548b7b
@predominant predominant Update basics test for debug() changes. 0deaa6e
@jrbasso jrbasso Making the format attribute customizable in helpers. d97103d
@jrbasso jrbasso Putting the auth and proxy data in request attribute after request. 453c536
@markstory markstory Merge branch '1.3' into merger
@markstory markstory Fixing validation methods + features lost in [f51ce73] due to a bad
Fixing additional tests to reflect changes in 2.0
@markstory markstory Fixing more tests that were failing post merge. ceca179
@markstory markstory Making behaviour of debug() consistent between cli and web. 9bfd170
@jrbasso jrbasso Support to download requests. eeafb55
@markstory markstory Adding stack traces to logged exceptions, as I forgot them last time …
@markstory markstory Making unknown errors with codes higher than 500 render as error500.
Test added.
@markstory markstory Adding a base HttpException for all the various HttpExceptions that c…
…ake provides, this should make it easier to write concise catch blocks.
@jrbasso jrbasso Making the cookies independent for each host. d332f06
@jeremyharris jeremyharris Added shorter timeout to fsockopen checks b3f55bf
@jeremyharris jeremyharris Allowed comma-delimited list in smtp $to var to be consistent with st…
…andard mail delivery. Fixes #1353
@markstory markstory Making all core classes throw CakeException subclasses, this allows d…
…evelopers to catch framework exceptions with one catch.

Adding package specific exceptions.
Replacing generic exceptions in the codebase with CakeException + package exceptions.
@markstory markstory Making baked code throw 404 errors when you try to edit, delete, or v…
…iew records that do not exist. Updated tests.
@markstory markstory Updating __() use in scaffold to take advantage of sprintf() being bu…
…ilt into __() now.
@markstory markstory Changing Scaffold to use exceptions to indicate error states.
Starting to convert record deletion to POST only.
@markstory markstory Updating scaffold templates to use post forms for delete buttons. Upd…
…ating test case.
@markstory markstory Making scaffold form view names consistent with those used in bake.
Renaming test_app files.
Fixes #501
@markstory markstory Moving the modParams option into ObjectCollection, so it can replace …
…the specific trigger method in BehaviorCollection.

Changed how break behaves, so it is works better with modParams and collectReturn options.
Tests updated and expanded.
@markstory markstory Adding documentation. b135e38
@markstory markstory Fixing strict warnings in TreeBehavior and a few other classes. 33b8a35
@markstory markstory Fixing additional strict warnings. 81e009b
@markstory markstory Removing BehaviorCollection::trigger() so it uses the parent method.
Updating model to use the new behaviorcollection trigger method signature.
@markstory markstory Making modParams ignore null results.
Test added.
@markstory markstory Making a bunch of properties public so containable can hack around. N…
…eed to refactor and fix visibility issues.

Fixing failing tests in containable.
@markstory markstory Fixing strict errors in Set class. cc81f6d
@markstory markstory Fixing strict errors in translate and acl behaviors.
Removing conditional definition of I18nModel.  There is no reason for it to exist anymore.
Removing duplicate class definition.
@markstory markstory Making ModelBehavior beforeX callbacks default to returning true. Ret…
…urning null or false from a Behavior::before method will abort the operation. It felt illogical to have null continue, but false stop.
@markstory markstory Adding containable to the AllBehaviors test as it now runs. ce2e605
@markstory markstory Fixing more strict errors and usage errors in BehaviorCollection test.
Making modParams only work if the result is an array.  This is for compatibility with previous behaviour.
@markstory markstory Fixing tests in ComponentCollection and HelperCollection as return of…
… trigger now depends on the triggered objects.

Removing annoying test that broke anytime something changed in Model.
@markstory markstory Making ModelBehavior::beforeFind() return true by default. Since
returning null causes the find to abort, behaviors should return true if
they are not going to return a query array.
@markstory markstory Fixing most of the strict errors in the helper test suite. 017385d
@jrbasso jrbasso Renamed setAuthConfig to configAuth, and setProxyConfig to configProxy. c20b5d7
@markstory markstory Fixing strict errors that were causing shell tests to fail.
Fixing test case for bake test that has been getting skipped.
@markstory markstory Fixing more strict warnings. 0ac8d04
@markstory markstory Fixing more strict warnings. 2fe6014
@jrbasso jrbasso Created the HttpResponse to get HttpSocket responses. dfb76d6
@jrbasso jrbasso Adjusting HttpResponse responses in array to be more compatible. f45027e
@jrbasso jrbasso Updated the HttpSocket to use the new HttpResponse. 60a9d34
@jrbasso jrbasso Moved the response methods from HttpSocket to HttpResponse. 176da15
@jrbasso jrbasso Allowing the user change the response class. 2f64afe
@jrbasso jrbasso HttpResponse::getHeader() is more flexible to accept a custom header …
@markstory markstory Removing auto-start from CakeSession. Lazy starting will be more perf…
…ormant in most cases.
@markstory markstory Updating session to lazy start after the first time an operation has …
…been performed. This should make controllers that only use sessions on some actions perform better.
@markstory markstory Making the id() test pass. 106c118
@markstory markstory Converting assertions to not use compatibility wrappers. daf6084
@markstory markstory Removing forced start of sessions now that they are lazily started. bd95179
@jrbasso jrbasso Removed parseHeader from HttpSocket (it was not used). Moved the test…
…s of parseHeader to HttpResponse.
@jrbasso jrbasso Removed the lineBreak attribute, this is fixed in RFC. 2cbece6
@jrbasso jrbasso Removed the import. It is called in request. 296aef2
@jeremyharris jeremyharris Move Controller::paginate() into PaginatorComponent 9fa1bec
@markstory markstory Fixing tests so they initialize the session, before trying to test th…
@jeremyharris jeremyharris Merge commit '42a5ebf47b73bbdf200f0238e30e6d4893695f80' into 2.0 10bf41a
@markstory markstory Updating bake templates to let PUT methods through as well. 75af48b
@markstory markstory Removing CakeSession::watch() and CakeSession::ignore(). You should u…
…se logging, or an interactive debugger instead.
@jrbasso jrbasso Updated the config of auth in digest method. 9940728
@markstory markstory Removing a var_dump because I'm a muppet. 478d158
@jrbasso jrbasso Fixed basic proxy test. 575da67
@jrbasso jrbasso Fixed documentation. ad5e724
@jrbasso jrbasso Merge with 2.0-http. c0e2f63
@jeremyharris jeremyharris Added ControllerTestCase class for testing controllers. Fixes #1244 b9143dc
@jrbasso jrbasso Updated to HttpSocket, HttpResponse and CakeSocket use SocketException. 754c9b2
@jeremyharris jeremyharris Added ObjectCollection test to libs group 29441ca
@jrbasso jrbasso Fixed the define name to run all socket tests. a6014cf
@markstory markstory Fixing incorrect exception type. 7b4ffa2
@markstory markstory Removing duplicated tests, and tests for methods that are not impleme…
…nted in the subclasses.
@jeremyharris jeremyharris Fixed problems where running all tests will fail due to duplicate cla…
@jeremyharris jeremyharris Merge branch '2.0' of into 2.0 904cb8a
@jeremyharris jeremyharris Merge branch '2.0-1353' into 2.0 9e74283
@markstory markstory Fixing failing tests. a054695
@markstory markstory Adding parent calls. 5ff376e
@markstory markstory making assertions run against the test case, not the subject test case. 9dcea30
@markstory markstory Removing duplicate class definition that could cause test suite incon…

Adding skip for when AppController is defined.
Changing how mock models are constructed to better use Model::__construct parameters.
@markstory markstory Starting to switch to a _mergeParent. This will allow un skipping of …
…many tests, and make mergeVars more flexible.
@markstory markstory Using $_mergeParent to unskip tests in test suites. 339cb41
@markstory markstory Removing a duplicate test, and extra classes. 95f5832
@markstory markstory Making more tests no longer skip in test suites. 42754c6
@markstory markstory Making PagesController test unskipped in all_tests. f50a97b
@markstory markstory Removing uses() it was deprecated in 1.3. Use App::import() instead. 24373ae
@markstory markstory Fixing more strict warnings.
Removing & on component callbacks.
Updating incorrect method signatures.
@markstory markstory Starting to try and re-factor named params to perform better and be more
explicit with how they are used.
@markstory markstory Refactored CakeRoute::match() to not use Set::diff(). This was the sl…
…owest part of reverse routing and this change should make things faster.

Added additional tests for the 0 edge case.
@markstory markstory Adding another case that makes false/null to not cause match failure. 6ef8203
@markstory markstory Fixing issue where named params equal to null/false would be part of …
…the generated url.
@markstory markstory Fixed a number of tests, there are still a few issues with prefix rou…

Moved removing defaults that are also keys to the compile step.  This
removes quite a few repetitive loops.
@markstory markstory Router tests all pass now. 756b098
@markstory markstory Making route matching fail even faster. This gives significant perfor…
…mance boosts to routes not matching.
@markstory markstory Updating doc block for Router::redirect()
Updating RedirectRoute to not use defaults for where the route will redirect.
@markstory markstory Removing garbage from Paginator test cases. b1630d4
@markstory markstory Fixing calltime pass by reference deprecation warnings. 9c1516e
@markstory markstory Adding query string generation into CakeRoute. This removes one more …
…task from Router. Tests added

Adding constants for the named param and querystring param sigils.
@markstory markstory Added another test for querystring params. Querystring params should …
…not be affected by greedy routes, as they are not really controlled by internal routing.
@markstory markstory Making a test actually test what its supposed to. 7c6af5b
@markstory markstory Extracting a method from paginator component. a6cca7c
@markstory markstory Reapplying changes in [33d2f9a] as they got lost when the paginator c…
…omponent was extracted.
@markstory markstory Fixing failing tests in PaginatorComponent. 54c52d8
@markstory markstory Adding paramType to the test cases. 7585b29
@markstory markstory Pulling out parameter merging logic into a method, this allows specif…
…ic typing of parameter merging (named, querystring, route). Also simplifies whitelisting of request parameters.

Tests added for merging and whitelisting.
@markstory markstory Updating tests to not use the deprecated Controller::$passedArgs.
Removing messy and hard to understand defaults + whitelisting from paginate() now that it has a separate method.
@markstory markstory Moving validation of sorting to a separate method. This makes it easi…
…er to test, extends and read.

Tests added.
@markstory markstory Removing show alias, it was undocumented and untested. 1e741de
@markstory markstory Moving limit checking into a separate method, and adding tests.
Removing $scope from being passed down to the options, it previously only allowed additional conditions to be set.
Updated tests.
@markstory markstory Adding some docblock info about pagination. f54479e
@markstory markstory Reformatting code, and removing merging of defaults key in the helper…
…. It no longer exists.
@markstory markstory Reformatting paging params.
Removing defaults from the paging params as they are no longer being used.
@markstory markstory Making paging.options only contain options that are not in the defaul…
…ts. This replaces the many diffs that were calculated on each url generation between paging.options and paging.defaults.
@markstory markstory Making paging params match those that would be generated by Paginator…
@markstory markstory Moving limit from the options to the normal paging params. This fixes…
… a few notice errors.
@markstory markstory Deleting duplicate tests.
Moving a test out into a separate method.
@markstory markstory Implementing ability to change pagination params to use querystring v…

Tests added.
@markstory markstory Fixing named params that were missing the : and fixing Router::revers…
…e() so it adds in the :
@markstory markstory Removing pagination test from Containable test case, it doesn't make …
…sense there.
@markstory markstory Making more tests pass with the named parameter changes. 4c3736a
@markstory markstory Removing whitespace and adding some more documentation. 025ba23
@markstory markstory Adding more documentation to connectNamed().
Changing argSeparator -> separator, as it is less typing and easier to remember.
@markstory markstory Removing named parameter sigils. b49b49a
@markstory markstory Reversing changes that required a : sigil for named parameters. Also …
…removing ?foo style parameters for querystring args. Having two ways to create querystring args was not sitting well with me.

Tests updated.
@markstory markstory Moving some tests around so its easier to figure out what's being tes…

Adding a querystring test.
@markstory markstory Adding tests for creating next/prev links with querystrings.
Removing code that doesn't seem to do anything, no tests fail when its removed.
@markstory markstory Increasing code coverage. abc6a28
@markstory markstory Fixing fencepost errors.
Splitting tests up into smaller groups.
@markstory markstory Removing @author tags that snuck in. f85567a
@markstory markstory Removing View::$autoRender it wasn't used.
Removing @access tags, which just restated the visibility keywords.
Adding documentation to a number of parameters and methods.
@markstory markstory more doc blocks. d5589d2
@markstory markstory More documentation. afbc73a
@markstory markstory Correcting and expanding documentation on console classes. 1c6b261
@markstory markstory Fixing issue where prefixes would not be correctly loaded for a request. af2a512
@markstory markstory Removing strlower() calls as they are not needed in php5 land. 3c6fc55
@jrbasso jrbasso Removing extra parameter. 27477bb
@markstory markstory Adding a doc block and code sample for MediaView. aff5cd7
@markstory markstory Adding some more documentation to ModelBehavior as well as basic usage. 98c356a
@markstory markstory Adding more documentation to DboSource. a37b3a1
@markstory markstory Fixing an entirely wrong condition that prevented routes from being l…
@markstory markstory Renaming Dispatcher::__loadRoutes -> Dispatcher::_loadRoutes to match…
… naming conventions.

Updating method name usage, as assertType is deprecated as of PHPUnit 3.5.6
@markstory markstory Removing whitespace. 3fc8a1f
@jrbasso jrbasso Optimization in postLink and create methods from FormHelper. ff18fe4
@markstory markstory Removing @subpackage tags, moving contents of @subpackage into @package.
Removing duplicate cake.cake in @package tags.
Renaming -> app
@markstory markstory Missed a package tag. d858932
@markstory markstory Updating console class @package tags. 2385d9c
@markstory markstory Fixing more @package tags, and removing duplicate tags in classes. 4009b6b
@markstory markstory Merge branch '2.0' into 2.0-pagination
@markstory markstory Removing deprecated $this->params in Helpers, it got missed somehow.
Removing PaginatorHelper::$convertKeys.  Its just a regular option now.
Added some documentation.
@markstory markstory Adding convertKeys to PaginatorHelper::options().
Added a test case.
Fixes #1390
@markstory markstory Adding basic BehaviorCollection::hasMethod implementation. Tests added. 769da1a
@markstory markstory Adding ability for BehaviorCollection::hasMethod() to return the call…

Re-factored BehaviorCollection::dispatchMethod to be simpler and faster.
Changing now BehaviorCollection stores callbacks so they look like normal php callback arrays.
@markstory markstory Making __methods and __mappedMethods protected instead of private. ad5a1ca
@markstory markstory Adding documentation. 3022e2d
@markstory markstory Removing test that is testing methods covered in ObjectCollection tes…
…t case.
@markstory markstory Adding Model::hasMethod() and tests. fd3b4b2
@markstory markstory Making it possible for behaviors to define paginate and paginateCount…
…. Updated test to ensure the component calls the correct methods.

Fixes #1373
@markstory markstory Fixing calltime pass by reference deprecation warnings. 6f1eca7
@markstory markstory Updating version numbers for 2.0.0-dev be96338
@markstory markstory Merge branch '2.0' into 2.0-pagination
@markstory markstory Changing how PaginatorComponent::paginate()'s $whitelist param works.…
… It now serves as the whitelist for fields ordering can be done on. It previously allowed you to whitelist things you passed into paginate(), which was kind of useless.

Updated tests.
Fixes #430
@markstory markstory Fixing fatal error caused by Debugger not being loaded when viewing t…
…he default home page.
@markstory markstory Fixing issue in console when baking a new project, from outside the
installation directory you would get an error because database.php could
not be found.  Fixes #1406

Actually I'd suggest that's the wrong fix, there isn't really a circumstance whereby you'd want to show the contents of that file with debug == 0.

IME it's actually quite common if you don't create an app/views/pages/home.ctp file and either through lack of foresight or error (with routes config) expose the default home page on your live app.

Therefore, I'd propose the following as a more appropriate fix:

if (!Configure::read()) {
    throw new NotFoundException();
    return; // no contents, just the layout. 

I also encourage other devs to create an appropriate or blank file in views/pages/home.ctp to prevent the default view from being reachable.

Well the fix was to fix fatal errors because Debugger hadn't been loaded. But I see your point about both the baked home page, and the built-in one throwing exceptions.

Dieter Plaet... and others added some commits
Dieter Plaetinck Give PaginatorHelper's next/prev links the correct 'rel' attribute
It's a good idea to give links such as next/prev the 'rel' attribute.
See the following pages for more information:

Signed-off-by: mark_story <>
@markstory markstory Updating test cases for the addition of rel attributes to links gener…
…ated by PaginatorHelper. Also removed rel attributes for disabled elements, as they are probably not link tags. Fixes #370
@markstory markstory Fixing option documentation. fd88d57
@markstory markstory Adding rel attributes for first and last links. These attribute value…
…s are part of the html5 spec, and fit with the intention of #370
@markstory markstory Fixing deprecated access to $this->data. b6b4f4a
@markstory markstory Adding usage and expanding doc blocks for PaginatorHelper. 85baa18
@markstory markstory Fixing more boundary issues with first() and last(). When you entered…
… a first/last range a wonky page link would be generated. Tests added.
@markstory markstory Adding a usage sample to Paginator->numbers() ab552c2
@markstory markstory Updating documentation for paginator helper, and component. 7dd1eea
@markstory markstory Fixing issue where ClassRegistry would not be loaded when using Models
in shells.  Fixes #1417
@markstory markstory Merge branch '2.0-pagination' into 2.0 a9a1994
@markstory markstory Fixing failing test caused by missing space. 1f6fba9
@markstory markstory Fixing issues with isThisWeek() when the year ends midweek. 04c602e
@lorenzo lorenzo Changes to make mysql cast boolean vaules to the native php boolean d…
@lorenzo lorenzo Changing a bit how postgres driver treats booleans so it correcty cas…
…ts them
@lorenzo lorenzo Changes to make sqlite recognize boolean columns declared as "boolean…
…", so they can be casted to native php type
@lorenzo lorenzo Adding boolean casts for sqlite 5a75d1d
@jeremyharris jeremyharris Reordered PaginatorHelper::sort() key and title to be more consistent.
Fixes #1000
@markstory markstory Removing empty fixtures array. 09d357c
@markstory markstory Fixing tests that were passing by accident. The mockObjects array was…
…n't being appended to so tests were passing when they shouldn't have.

Fixing more failing tests.
@jeremyharris jeremyharris Added support for using plugin syntax in App::objects(). Fixes #1366 4d2fdcd
@markstory markstory Fixing failing tests because of incorrect types. d3d0095
@markstory markstory Removing silent errors in PDO dbo's when a connection exception is cr…

Adding the host param for mysql.
Adding a test for mysql missing the host param.
Fixes #1427
@lorenzo lorenzo Checking for null values before converting to boolean 665e560
@lorenzo lorenzo Fixing typo in sqlite driver 4948280
@lorenzo lorenzo optimizing sqlite driver to look for the "From" keyword in reverse or…
…der on the sql string
@jeremyharris jeremyharris Added $format option to TimeHelper::nice(). Fixes #433, #638, #291, #801
@jeremyharris jeremyharris Merge remote branch 'upstream/2.0' into 2.0 37b98ff
@AD7six AD7six only check the default template path is correct
this prevents a misleading error if you've more than one bake template installed
@markstory markstory Merge branch '1.3' into merger
@markstory markstory Merge branch 'merger' into 2.0 122dc65
@markstory markstory Fixing a few failing tests in helper tests. f87ae54
@jeremyharris jeremyharris Fixed typo 65d1c03
@jeremyharris jeremyharris Allowed components to be aliased by setting the 'alias' key 1f1d920
@jeremyharris jeremyharris Allowed helpers to be aliased by setting the 'alias' key 9749dc8
@jeremyharris jeremyharris Allowed behaviors to be aliased by setting the 'alias' key 24d90c1
@markstory markstory Making Set::filter() only operate on arrays.
Also making Set::filter() work properly in a recursive fashion.  This matches behavior with other functions in Set.  Fixes #1431
@jrbasso jrbasso Changed the trigger_error by exceptions in ConnectionManager. d15ed32
@jeremyharris jeremyharris Reversed alias and actual class to be more consistent with how Model …
…aliases load and to make migration easier
@jeremyharris jeremyharris Updated documentation 39e06b0
@markstory markstory Moving parent constructor call until after $helpers has been modified…
…. Fixes #1443
@jeremyharris jeremyharris Fixed aliasing so it works with plugins in the 'className' key 1f0c57c
@jeremyharris jeremyharris Merge remote branch 'upstream/2.0' into 2.0 be563e1
@markstory markstory Removing the last vestiges of the enable parameter.
Fixing issue where isset() stupidly plods along when doing a string index of a string.
Updating DbAcl to use proper settings array.
Fixes #1467
@markstory markstory Merge branch '1.3' into merger
@markstory markstory Fixing test cases and code from merge with 1.3
Making MemcacheEngine::__Memcache protected, so mocking is possible.
@jrbasso jrbasso Fixing the postLink url when the application is not in root path. f73c4f3
@jeremyharris jeremyharris Added support for plugin classes in ControllerTestCase::generate(). F…
…ixes #1453
@jeremyharris jeremyharris Merge remote branch 'upstream/2.0' into 2.0 46d14c5
@jrbasso jrbasso Removing unsupported databases natively. 6181db0
@jrbasso jrbasso Removing extra param in internacionalization. 09fbaaa
@jrbasso jrbasso Removing $name from controller, model and fixtures. 40bdcbb
@jrbasso jrbasso Generating PHPDoc to baked files. 6002f10
@jrbasso jrbasso Implemented the beforeRedirect callback in controller. e64e299
@markstory markstory Fixing Router::reverse() not correctly working with Request objects that
contained query string parameters.
@jrbasso jrbasso Replacing deprecated startTest/endTest by setUp/tearDown in bake temp…
@jrbasso jrbasso Checking test to avoid fatal error when the test case dont have test …
@jeremyharris jeremyharris Removed unnecessary imports and ensured model import. Fixes #1453 68799c9
@jeremyharris jeremyharris Merge remote branch 'upstream/2.0' into 2.0 c970770
@jrbasso jrbasso Support to html5 in docType. 41e1aa7
@jrbasso jrbasso Created the method useTag in html, avoiding sprintf with Html tags in…
… others helpers.
@jrbasso jrbasso Replacing sprintf using Html tags by useTag. 5bc0f0c
@jrbasso jrbasso Moving the parseAttributes to Html helper. 10d3dd5
@jrbasso jrbasso Changed tags attributes to protected. b1f4c6a
@jrbasso jrbasso Moving loadConfig to Html helper. 7df9782
@jrbasso jrbasso Support to read ini files without section in IniReader. 1a90bf7
@jrbasso jrbasso Reading configuration using reader classes. You can pass the key conf…
…igFile in Html settings to load in constructor.
@jrbasso jrbasso Support to read ini files without section in IniReader. 55c557d
@jrbasso jrbasso Throwing exception instead notice in loadConfig. 5b8f680
@jrbasso jrbasso Ini/Php readers now read files with/without extension. be98491
@jrbasso jrbasso Assigning the helper object in view class, avoiding to use __get magi…
…c for each call.
@jrbasso jrbasso Merge remote branch 'jrbasso/2.0-html' into 2.0 dc4357f

This second expectation will probably never be met, as the assertions above throw an exception. Perhaps separate it out into a separate method?


I just remembered. Don't forget to update the wiki docs about the new setting :)


Ow, I forgot the docs, updated now. Thanks to remember.

About the exception, really, the second test is not running, so I changed in another commit. Thanks again.

@zoghal zoghal closed this

Why this deletion does not effect to "Helper" now?
It seems commit history of this was lost and remains the codes of parseAttributes() in the (renamed)file.


It was lost in some merge with 1.3. We just got it in the release candidate step and now these methods are marked as deprecated in Helper and will be removed in 2.1+


Some providers don't strictly follow the Chunked Transfer Encoding by putting only a \n at the end of the Chunk header.
Don't know if it should be taken into account here, but sometimes I have to use that regexp :
/^([0-9a-f]+) *(?:;(.+)=(.+))?[\r\n]{1,2}/iU

And sorry I didn't find the original commit of that line


That specific pattern causes two existing tests to fail, however /^([0-9a-f]+) *(?:;(.+)=(.+))?(?:\r\n|\n)/iU works with improper and proper line endings.

Alright, thanks for the improvement. And sorry to not have checked the tests.
Do you think I should do a pull request on that one ?

edit : ok, you already changed it here Thanks !


Since the $chunkLength value is a number of bytes (as specified in the RFC : "chunk-data = chunk-size(OCTET)"), the use of substr could lead to remove some extra bytes and broke the decoding :

Testing case :

  • mbstring.func_overload & 2 == 2 (internally replace substr to mb_substr)
  • the $body variable contains at least one multibyte character (é for instance).

I would suggest the use of mb_strcut ([...] operates on bytes instead of characters.) as a replacement.

Note : This is a very specific situation. Since the basic strlen (without overloading) works as "1 byte == 1 character", it would still works for multi-bytes string. The suggestion given is fixing for the specific case without to broke the general one.


Is this a merging error? Does it make sense to use array_filter() without the second argument? I get that with the current master branch: "Warning: Warning (2): array_filter() expects parameter 1 to be array, null given in [/.../lib/Cake/View/Helper/PaginatorHelper.php, line 403]"


I don't know this was 3 years ago.


Funny that this happens only on one Linux system with PHP5.3 and nowhere else.
It is a simple:

<?php echo $this->Paginator->sort('distance', null, array('class' => $class, 'direction' => 'asc'));?>


 array_filter - [internal], line ??
 PaginatorHelper::url() - CORE/Cake/View/Helper/PaginatorHelper.php, line 403
 PaginatorHelper::link() - CORE/Cake/View/Helper/PaginatorHelper.php, line 386
 PaginatorHelper::sort() - CORE/Cake/View/Helper/PaginatorHelper.php, line 353
 include - APP/View/Elements/pagination.ctp, line 28

The lines refer to the current master branch (cake2.3), from yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.